Message-ID: <481A3F37.5010509@...41...> Date: Thu, 01 May 2008 16:07:51 -0600 From: James Yonan MIME-Version: 1.0 References: <4811E5AA.8060900@...1090...> <4818EF70.6060900@...41...> In-Reply-To: Subject: Re: [Openvpn-devel] [patch] OpenVPN 2.1_rc7, multihome and 64 bit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit To: Marko Rauhamaa Cc: openvpn-devel@lists.sourceforge.net Marko Rauhamaa wrote: > James Yonan : > > >> Interesting. I wonder if a better solution might be to bracket the >> struct openvpn_pktinfo definition with >> >> #pragma pack(1) >> ... >> #pragma pack() >> > > Yes, although gcc is allergic to #pragma's. The gcc way of expressing it > is: > > struct __attribute__ ((__packed__)) my_packed_struct > { > char c; > int i; > struct my_unpacked_struct s; > }; > > (from "info gcc" -> "C Extensions" -> "Type Attributes"). > > > Marko > gcc does support #pragma pack: http://gcc.gnu.org/onlinedocs/gcc/Structure_002dPacking-Pragmas.html James