]> git.sur5r.net Git - freertos/commitdiff
The Keil compiler insists on having the IP address structure packed, but doing so...
authorrichardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Fri, 13 May 2011 17:28:46 +0000 (17:28 +0000)
committerrichardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Fri, 13 May 2011 17:28:46 +0000 (17:28 +0000)
git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@1422 1d2547de-c912-0410-9cb9-b8ca96c0e9e2

Demo/Common/ethernet/FreeTCPIP/net/uip.h

index 3cfad7bef01a13e50447e241cf0b111140aa623d..3a0ed1989470ca4d12b207300120d4d0aab47d6a 100644 (file)
 \r
        typedef uip_ip6addr_t   uip_ipaddr_t;\r
 #else /* UIP_CONF_IPV6 */\r
-       #include "pack_struct_start.h"\r
-               typedef union                   uip_ip4addr_t\r
-               {\r
-                       u8_t    u8[4];  /* Initializer, must come first!!! */\r
-                       u16_t   u16[2];\r
-               } uip_ip4addr_t;\r
-               typedef uip_ip4addr_t   uip_ipaddr_t\r
-       #include "pack_struct_end.h"\r
+       #ifdef __CC_ARM\r
+               __packed /* The ARM compiler insists on this being packed, but with other compilers packing it generates a warning as it will be packed anyway. */\r
+       #endif\r
+\r
+       typedef union                   uip_ip4addr_t\r
+       {\r
+               u8_t    u8[4];  /* Initializer, must come first!!! */\r
+               u16_t   u16[2];\r
+       } uip_ip4addr_t;\r
+       typedef uip_ip4addr_t   uip_ipaddr_t;\r
 #endif /* UIP_CONF_IPV6 */\r
 \r
 /*---------------------------------------------------------------------------*/\r