ALIGNED redefined in lwip-sys/arch/cc.h

27 Oct 2012

When using the gcc-arm compiler, the ALIGNED directive seems to be defined twice in lwip-sys/arch/cc.h, both in EthernetInterface and in NetServices.

    /* GCC tools (CodeSourcery) */
    #define PACK_STRUCT_BEGIN
    #define PACK_STRUCT_STRUCT __attribute__ ((__packed__))
    #define PACK_STRUCT_END
    #define PACK_STRUCT_FIELD(fld) fld
    #define ALIGNED(n)  __attribute__((aligned (n)))
    #define ALIGNED(n)  __align(n)

I found a description of the first line at:

http://www.keil.com/support/man/docs/armccref/armccref_Cacjcjce.htm

and the second at:

http://www.keil.com/support/man/docs/armccref/armccref_BABDFECC.htm

But it's not clear to me if one directive should be named differently or deleted entirely...