about summary refs log tree commit diff
diff options
context:
space:
mode:
authorManish Goregaokar <manishsmail@gmail.com>2015-03-18 14:39:34 +0530
committerManish Goregaokar <manishsmail@gmail.com>2015-03-18 22:21:08 +0530
commitc341fe9f8cfb6d1aef6c9fb8ba7531a4c0324eef (patch)
treea99c60b9f6930314f2091a84b9cd0e93bc6a6232
parent51bc2f1f37961a4a5f252759704b4a095bb05ee9 (diff)
parent71982c21245489fd316fc9e82bf7bec4b09d45a6 (diff)
downloadrust-c341fe9f8cfb6d1aef6c9fb8ba7531a4c0324eef.tar.gz
rust-c341fe9f8cfb6d1aef6c9fb8ba7531a4c0324eef.zip
Rollup merge of #23450 - alexcrichton:fix-sockaddr-storage, r=brson
 The alignment field is actually a \"pointer sized\" type instead of always i64,
requiring that the size of the padding field is also calculated slightly
differently.

Closes #23425
-rw-r--r--src/liblibc/lib.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/liblibc/lib.rs b/src/liblibc/lib.rs
index 82c54004e99..1e1b128d712 100644
--- a/src/liblibc/lib.rs
+++ b/src/liblibc/lib.rs
@@ -269,8 +269,8 @@ pub mod types {
                 #[repr(C)]
                 #[derive(Copy)] pub struct sockaddr_storage {
                     pub ss_family: sa_family_t,
-                    pub __ss_align: i64,
-                    pub __ss_pad2: [u8; 112],
+                    pub __ss_align: isize,
+                    pub __ss_pad2: [u8; 128 - 2 * (::core::isize::BYTES as usize)],
                 }
                 #[repr(C)]
                 #[derive(Copy)] pub struct sockaddr_in {