lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-users] Problem With dns.c Using 32-Bit Compilers


From: Jonathan Larmour
Subject: Re: [lwip-users] Problem With dns.c Using 32-Bit Compilers
Date: Fri, 18 Jan 2008 00:18:44 +0000
User-agent: Mozilla Thunderbird 1.0.8-1.1.fc4 (X11/20060501)

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]