changeset 943:27623db51ce3 draft

Pack the dhcp structure.
author Roy Marples <roy@marples.name>
date Fri, 05 Sep 2008 11:54:44 +0000
parents a36adae2cc8a
children 057fcc76587f
files common.h dhcp.h
diffstat 2 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/common.h	Fri Sep 05 11:46:03 2008 +0000
+++ b/common.h	Fri Sep 05 11:54:44 2008 +0000
@@ -48,9 +48,11 @@
 
 #if __GNUC__ > 2 || defined(__INTEL_COMPILER)
 # define _noreturn __attribute__((__noreturn__))
-# define _unused    __attribute__((__unused__))
+# define _packed   __attribute__((__packed__))
+# define _unused   __attribute__((__unused__))
 #else
 # define _noreturn
+# define _packed
 # define _unused
 #endif
 
--- a/dhcp.h	Fri Sep 05 11:46:03 2008 +0000
+++ b/dhcp.h	Fri Sep 05 11:54:44 2008 +0000
@@ -155,7 +155,7 @@
 	uint8_t bootfile[BOOTFILE_LEN];    /* boot file name */
 	uint32_t cookie;
 	uint8_t options[DHCP_OPTION_LEN]; /* message options - cookie */
-};
+} _packed;
 
 struct dhcp_lease {
 	struct in_addr addr;