Rich Felker 1e6fc0b690 avoid padding gaps in struct sockaddr_storage
compilers are free not to copy, or in some cases to clobber, padding
bytes in a structure. while it's an aliasing violation, and thus
undefined behavior, to copy or manipulate other sockaddr types using
sockaddr_storage, it seems likely that traditional code attempts to do
so, and the original intent of the sockaddr_storage structure was
probably to allow such usage.

in the interest of avoiding silent and potentially dangerous breakage,
ensure that there are no actual padding bytes in sockaddr_storage by
moving and adjusting the size of the __ss_padding member so that it
fits exactly.

this change also removes a silent assumption that the alignment of
long is equal to its size.
2016-06-09 13:42:06 -04:00
..
2014-04-07 02:46:15 -04:00
2011-02-12 00:22:29 -05:00
2011-02-12 00:22:29 -05:00
2011-02-12 00:22:29 -05:00
2013-08-14 02:48:11 -04:00
2013-12-29 21:55:21 -05:00
2011-02-12 00:22:29 -05:00
2011-02-12 00:22:29 -05:00
2013-01-12 19:42:39 +01:00
2011-04-05 12:13:54 -04:00
2011-02-12 00:22:29 -05:00
2013-07-19 19:57:52 -04:00
2011-09-23 14:24:57 -04:00
2011-02-12 00:22:29 -05:00
2011-02-12 00:22:29 -05:00
2012-08-15 08:31:44 -04:00