musl/include
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
..
2013-07-03 18:07:50 +02:00
2012-05-06 16:35:32 -04:00
2012-09-08 18:16:33 -04:00
2014-06-21 19:24:15 -04:00
2012-09-30 20:00:38 -04:00
2013-04-10 22:38:46 -04:00
2012-05-06 16:35:32 -04:00
2013-11-29 12:45:09 -05:00
2016-06-09 13:40:13 -04:00
2014-07-31 02:38:23 -04:00
2013-01-04 20:36:34 +01:00