[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [lwip-users] Problem With dns.c Using 32-Bit Compilers
From: |
Nick Thomas |
Subject: |
RE: [lwip-users] Problem With dns.c Using 32-Bit Compilers |
Date: |
Wed, 27 Aug 2008 17:42:14 +0100 |
-----Original Message-----
From: address@hidden
[mailto:address@hidden Behalf
Of Jonathan Larmour
Sent: 27 August 2008 17:24
To: Mailing list for lwIP users
Subject: Re: [lwip-users] Problem With dns.c Using 32-Bit Compilers
Nick Thomas wrote:
> 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.
Then this may not be the only problem you have. You need to look at your
compiler documentation (you didn't say which compiler it was) and see what
it requires for implementing things like packing and alignment. Most do.
GCC uses __attribute__ things, but most other compilers use #pragma so it's
worth looking for that.
Hi, I am using st20cc.
The compiler documentation details -falignN on the command line. I am
currently using -falign1 . The documentation says that this can be used to
ensure alignment to 1 byte.
However, it doesn't explain the extra padding at the end of the struct!
Regards
Nick
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.
------["Si fractum non sit, noli id reficere"]------ Opinions==mine
_______________________________________________
lwip-users mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/lwip-users
No virus found in this incoming message.
Checked by AVG - http://www.avg.com
Version: 8.0.138 / Virus Database: 270.6.9/1636 - Release Date: 8/26/2008
7:09 PM
- [lwip-users] Problem With dns.c Using 32-Bit Compilers, Nick Thomas, 2008/08/27
- Re: [lwip-users] Problem With dns.c Using 32-Bit Compilers, Jonathan Larmour, 2008/08/27
- RE: [lwip-users] Problem With dns.c Using 32-Bit Compilers,
Nick Thomas <=
- Re: [lwip-users] Problem With dns.c Using 32-Bit Compilers, Marek Matej, 2008/08/27
- Re: [lwip-users] Problem With dns.c Using 32-Bit Compilers, Jonathan Larmour, 2008/08/27
- Re: [lwip-users] Problem With dns.c Using 32-Bit Compilers, address@hidden, 2008/08/27
- Re: [lwip-users] Problem With dns.c Using 32-Bit Compilers, Jonathan Larmour, 2008/08/27
- Re: [lwip-users] Problem With dns.c Using 32-Bit Compilers, Alain M., 2008/08/27
- Re: [lwip-users] Problem With dns.c Using 32-Bit Compilers, Simon Goldschmidt, 2008/08/28
- RE: [lwip-users] Problem With dns.c Using 32-Bit Compilers, Bill Auerbach, 2008/08/28
- Re: [lwip-users] Problem With dns.c Using 32-Bit Compilers, Alain M., 2008/08/28
- Re: [lwip-users] Problem With dns.c Using 32-Bit Compilers, Michael Williamson, 2008/08/28
- Re: [lwip-users] Problem With dns.c Using 32-Bit Compilers, address@hidden, 2008/08/28