summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornetchild <netchild@FreeBSD.org>2013-07-10 10:40:52 +0000
committernetchild <netchild@FreeBSD.org>2013-07-10 10:40:52 +0000
commit0f473d6553985893f842123f973029b7d5ddf8f2 (patch)
tree3eba81110016664868c3894b85b8ecbba26acf67
parentc50bcc38cc6bc63cdd456cf6dfbb80c464c8cdf6 (diff)
downloadFreeBSD-src-0f473d6553985893f842123f973029b7d5ddf8f2.zip
FreeBSD-src-0f473d6553985893f842123f973029b7d5ddf8f2.tar.gz
Fix build for gcc users by declaring variables for unions in structs which
don't declare a variable. The size before/after this change of the structs doesn't change with gcc/clang. Noticed by: several Suggested by: Gary Jennejohn <gljennjohn@googlemail.com>
-rw-r--r--sys/contrib/v4l/videodev2.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/sys/contrib/v4l/videodev2.h b/sys/contrib/v4l/videodev2.h
index ff8b7bd..47904ba 100644
--- a/sys/contrib/v4l/videodev2.h
+++ b/sys/contrib/v4l/videodev2.h
@@ -427,7 +427,7 @@ struct v4l2_frmsizeenum {
union { /* Frame size */
struct v4l2_frmsize_discrete discrete;
struct v4l2_frmsize_stepwise stepwise;
- };
+ } x;
__u32 reserved[2]; /* Reserved space for future use */
};
@@ -457,7 +457,7 @@ struct v4l2_frmivalenum {
union { /* Frame interval */
struct v4l2_fract discrete;
struct v4l2_frmival_stepwise stepwise;
- };
+ } x;
__u32 reserved[2]; /* Reserved space for future use */
};
@@ -834,7 +834,7 @@ struct v4l2_dv_timings {
union {
struct v4l2_bt_timings bt;
__u32 reserved[32];
- };
+ } x;
} __attribute__ ((packed));
/* Values for the type field */
@@ -927,7 +927,7 @@ struct v4l2_ext_control {
__s32 value;
__s64 value64;
char *string;
- };
+ } x;
} __attribute__ ((packed));
struct v4l2_ext_controls {
@@ -1475,7 +1475,7 @@ struct v4l2_encoder_cmd {
struct {
__u32 data[8];
} raw;
- };
+ } x;
};
#endif
@@ -1597,7 +1597,7 @@ struct v4l2_mpeg_vbi_fmt_ivtv {
union {
struct v4l2_mpeg_vbi_itv0 itv0;
struct v4l2_mpeg_vbi_ITV0 ITV0;
- };
+ } x;
} __attribute__ ((packed));
/*
@@ -1648,7 +1648,7 @@ struct v4l2_dbg_match {
union { /* Match this chip, meaning determined by type */
__u32 addr;
char name[32];
- };
+ } x;
} __attribute__ ((packed));
struct v4l2_dbg_register {
OpenPOWER on IntegriCloud