lwip-users
[Top][All Lists]
Advanced

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

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


From: Nick Thomas
Subject: [lwip-users] Problem With dns.c Using 32-Bit Compilers
Date: Wed, 27 Aug 2008 17:08:09 +0100

I have the same problem as another user on this mailing list.
Again, is to do with the size of the structure dns_answers in dns.c .

sizeof(struct dns_answers) reports 12. But it really needs to be 10 to work.

I am using an ST5119 chip, and there doesn't seem to be much control over
the structure padding/alignment.

I have noticed that the extra 2 bytes are added to the end of the struct, so
the structure members are aligned where I want them to be, but I just need
to get rid of the extra 2 bytes of padding.

Is there a recognised solution to this?

The code:
#ifdef PACK_STRUCT_USE_INCLUDES
#  include "arch/bpstruct.h"
#endif
PACK_STRUCT_BEGIN

doesn't do anything in my build because I don't have a bpstruct.h file.

Also the __attribute__ method proposed by other people just causes a compile
error!


Any help appreciated.

Regards





reply via email to

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