Subject: ifconfig.c alignment attribute
To: None <thorpej@netbsd.org>
From: None <itojun@iijlab.net>
List: tech-net
Date: 04/25/2002 17:43:52
is the following "__attribute__((aligned(4))__" still necessary?
i don't think it needed for in6_aliasreq, at least.
itojun
struct ifreq ifr, ridreq;
struct ifaliasreq addreq __attribute__((aligned(4)));
#ifdef INET6
struct in6_ifreq ifr6;
struct in6_ifreq in6_ridreq;
struct in6_aliasreq in6_addreq __attribute__((aligned(4)));
#endif
>netbsd sbin/ifconfig/ifconfig.c
>----------------------------
>revision 1.35
>date: 1997/05/05 06:32:11; author: thorpej; state: Exp; lines: +3 -3
>Force the ifaliasreq "addreq" to have 4-byte alignment, so that casting
>one of its sockaddrs to a sockaddr_in doesn't cause an unaligned access
>iault on the Alpha.