Rearrange `sockaddr_storage` padding/alignment fields
Previously on Linux, the `sockaddr_storage` structure had padding bytes between
the `ss_family` and `__ss_align` fields. The `__ss_align` field has now been
moved to the end of the structure to eliminate these padding bytes, matching
recent glibc versions:
https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/unix/sysv/linux/bits/socket.h;h=4f1f810ea1d9bf00ff428e4e7c49a52c71620775;hb=c804cd1c00adde061ca51711f63068c103e94eef#l190
@@ -231,11 +231,11 @@ s_no_extra_traits! {
pub struct sockaddr_storage {
pub ss_family: sa_family_t,
- __ss_align: ::size_t,
#[cfg(target_pointer_width = "32")]
- __ss_pad2: [u8; 128 - 2 * 4],
+ __ss_pad2: [u8; 128 - 2 - 4],
#[cfg(target_pointer_width = "64")]
- __ss_pad2: [u8; 128 - 2 * 8],
+ __ss_pad2: [u8; 128 - 2 - 8],
+ __ss_align: ::size_t,
}
pub struct utsname {
