John Keil wrote:
The struct dns_answer contains 3 16-bit values and 1 32-bit value, and is
therefore 10-bytes long. Unfortunately, since it contains at least one
32-bit field, the compiler forces alignment on a 32-bit boundary, so sizeof
returns 12-bytes. My quick and dirty fix was to change that line of code
to...
[snip]
This implies to me that your compiler is not packing the structure. Are
the structure packing macros (PACK_STRUCT_BEGIN/STRUCT/END) implemented in
your cc.h? And correct for your compiler? Or you may need to provide
arch/bpstruct.h and arch/epstruct.h and define PACK_STRUCT_USE_INCLUDES,
depending on how structure packing is implemented in your compiler.
Jifl
--
eCosCentric Limited http://www.eCosCentric.com/ The eCos experts
Barnwell House, Barnwell Drive, Cambridge, UK. Tel: +44 1223 245571
Registered in England and Wales: Reg No 4422071.
------["The best things in life aren't things."]------ Opinions==mine
_______________________________________________
lwip-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/lwip-users