From owner-svn-src-head@FreeBSD.ORG Wed Jul 10 10:40:52 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 9AC647EB; Wed, 10 Jul 2013 10:40:52 +0000 (UTC) (envelope-from netchild@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 739581258; Wed, 10 Jul 2013 10:40:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6AAeqR0092476; Wed, 10 Jul 2013 10:40:52 GMT (envelope-from netchild@svn.freebsd.org) Received: (from netchild@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6AAeqbo092475; Wed, 10 Jul 2013 10:40:52 GMT (envelope-from netchild@svn.freebsd.org) Message-Id: <201307101040.r6AAeqbo092475@svn.freebsd.org> From: Alexander Leidinger Date: Wed, 10 Jul 2013 10:40:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253144 - head/sys/contrib/v4l X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Jul 2013 10:40:52 -0000 Author: netchild Date: Wed Jul 10 10:40:52 2013 New Revision: 253144 URL: http://svnweb.freebsd.org/changeset/base/253144 Log: 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 Modified: head/sys/contrib/v4l/videodev2.h Modified: head/sys/contrib/v4l/videodev2.h ============================================================================== --- head/sys/contrib/v4l/videodev2.h Wed Jul 10 10:38:43 2013 (r253143) +++ head/sys/contrib/v4l/videodev2.h Wed Jul 10 10:40:52 2013 (r253144) @@ -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 {