On 12 May 2010 20:21, Vincent Bernat <ber...@debian.org> wrote:

> Luca,     thanks    for     your     answer.    Unfortunately,     using
> __attribute__((aligned(2)))   would   align   the  pointer   to   struct
> sockaddr. I have no way to force alignment of the struct itself.

Gee, I completely misread the code (and even copy-pasted it!!)
Anyway, paying more attention to it, the first member of struct sockaddr is
short int sa_family, that must be 2 byte aligned.
Since C doesn't allow the reordering of struct members, the whole
struct must be 2byte aligned.
But then I don't understand why gcc is whining...
Cheers,

Luca


--
To UNSUBSCRIBE, email to debian-arm-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/aanlktinvxpkhkmc0dhp8kday5hm146-cnylsnnlbz...@mail.gmail.com

Reply via email to