Date: Thu, 17 Jan 2013 08:55:57 +0000 (UTC) From: Lawrence Stewart <lstewart@FreeBSD.org> To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r245545 - projects/diffused_head/sys/netinet Message-ID: <201301170855.r0H8tvew073107@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: lstewart Date: Thu Jan 17 08:55:56 2013 New Revision: 245545 URL: http://svnweb.freebsd.org/changeset/base/245545 Log: Mark some structs which are used for wire protocol parsing as __packed to ensure the compiler does the right thing to avoid unaligned accesses. Reported by: clang Modified: projects/diffused_head/sys/netinet/ip_diffuse_export.h Modified: projects/diffused_head/sys/netinet/ip_diffuse_export.h ============================================================================== --- projects/diffused_head/sys/netinet/ip_diffuse_export.h Thu Jan 17 08:51:02 2013 (r245544) +++ projects/diffused_head/sys/netinet/ip_diffuse_export.h Thu Jan 17 08:55:56 2013 (r245545) @@ -110,17 +110,17 @@ struct dip_header { uint16_t msg_len; uint32_t seq_no; uint32_t time; -}; +} __packed; struct dip_set_header { uint16_t set_id; uint16_t set_len; -}; +} __packed; struct dip_templ_header { uint16_t templ_id; uint16_t flags; -}; +} __packed; #if defined(WITH_DIP_INFO) static struct dip_info_descr dip_info[] = {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201301170855.r0H8tvew073107>