Dear Sir:
I am a LWIP primary programmer.
now,my project situation as below:
uc/os-II(2.86) + lwip(1.4.1 table) + RVDS2.2(armcc IDE:ADS) + s3c6410
case 1:
in cc.h
#define PACK_STRUCT_FIELD(x) x __attribute__((packed))
#define PACK_STRUCT_STRUCT __attribute__((packed))
#define PACK_STRUCT_BEGIN
#define PACK_STRUCT_END
compile pass!
I am so happy, but "__attribute__((packed))" is the standard usage under GUN CC,my compiler is ARMCC.
so I have to change to case 2.
case 2:
in cc.h
#define PACK_STRUCT_FIELD(x) __packed x
#define PACK_STRUCT_STRUCT
#define PACK_STRUCT_BEGIN __packed
#define PACK_STRUCT_END
this time compile failed as follow:
argument of type "const __packed u8_t *" is incompatible with parameter of type "const void *"
I track the code stop at etharp.c line 1340:
"} else if (eth_addr_cmp(ðhdr->dest, ðbroadcast)) {"
and #define eth_addr_cmp(addr1, addr2) (memcmp((addr1)->addr, (addr2)->addr, ETHARP_HWADDR_LEN) == 0)
I think I found the problem :
prototype: int memcmp(constvoid*buf1,constvoid*buf2,unsignedintcount);
but ðhdr->dest and ðbroadcast have something redundant"__packed"
the problem is I should not modify your source code, so give me a solution please,I would appreciate so much!