From: Roy Marples Date: Fri, 5 Sep 2008 11:54:44 +0000 (+0000) Subject: Pack the dhcp structure. X-Git-Tag: v5.0.0~290 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=99d755f98fbd68ea54a199f5ce27516e37108cd1;p=thirdparty%2Fdhcpcd.git Pack the dhcp structure. --- diff --git a/common.h b/common.h index 82adbada..1685c19f 100644 --- a/common.h +++ b/common.h @@ -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 diff --git a/dhcp.h b/dhcp.h index 0f605344..959907ab 100644 --- a/dhcp.h +++ b/dhcp.h @@ -155,7 +155,7 @@ struct dhcp_message { 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;