On Fri, May 08, 2009 at 01:44:57AM +0200, Bruno Haible wrote: > Simon Josefsson wrote: > > +#define _SS_PADSIZE (_SS_SIZE - (2 * sizeof (__ss_aligntype))) > > If the goal is that sizeof (struct sockaddr_storage) == _SS_SIZE, then the > formula is incorrect. It should be > (_SS_SIZE - (max (sizeof (sa_family_t), alignof (__ss_aligntype)) + sizeof > (__ss_aligntype))) > > > +#define _SS_SIZE 128 > > Is this enough for all platforms? Let's see... > > - IRIX 6.5 has no 'struct sockaddr_storage' but all 'struct sockaddr_*' > variants > are less than 64 bytes in size. > IRIX 6.5.30 has 'struct sockaddr_storage' and it is defined as size 128.
-tgc