]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Pack the dhcp structure.
authorRoy Marples <roy@marples.name>
Fri, 5 Sep 2008 11:54:44 +0000 (11:54 +0000)
committerRoy Marples <roy@marples.name>
Fri, 5 Sep 2008 11:54:44 +0000 (11:54 +0000)
common.h
dhcp.h

index 82adbada264793fbb4fd2ed92fd6aa0548341f6f..1685c19f87b492857cce6aeb96c3ce1f14c1ee64 100644 (file)
--- a/common.h
+++ b/common.h
 
 #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 0f6053447db8b00df25e44456d22d022b3f1dd26..959907ab07979a0284cc17b068b7ede3d0b00f52 100644 (file)
--- 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;