about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorManish Goregaokar <manishsmail@gmail.com>2015-03-29 18:22:15 +0530
committerManish Goregaokar <manishsmail@gmail.com>2015-03-29 18:22:15 +0530
commitef94b8a9d3e915318029b83e39af63861ca44952 (patch)
tree143b5870c82eec23a6c5229298fb7dbbafff884c /src
parentfa3d778626c394b3242fa161e35ccdecf055a3f1 (diff)
parentbd66f57e469b89a0b8ffbe273cac26c02cdf9874 (diff)
downloadrust-ef94b8a9d3e915318029b83e39af63861ca44952.tar.gz
rust-ef94b8a9d3e915318029b83e39af63861ca44952.zip
Rollup merge of #23811 - alexcrichton:libc-stable, r=Manishearth
Right now the `std::isize::BYTES` typedef is `#[unstable]`, but liblibc is using
this, preventing it from compiling on stable Rust.
Diffstat (limited to 'src')
-rw-r--r--src/liblibc/lib.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/liblibc/lib.rs b/src/liblibc/lib.rs
index 7174b2d2c29..b7162c4a177 100644
--- a/src/liblibc/lib.rs
+++ b/src/liblibc/lib.rs
@@ -307,7 +307,10 @@ pub mod types {
                 #[derive(Copy)] pub struct sockaddr_storage {
                     pub ss_family: sa_family_t,
                     pub __ss_align: isize,
-                    pub __ss_pad2: [u8; 128 - 2 * (::core::isize::BYTES as usize)],
+                    #[cfg(target_pointer_width = "32")]
+                    pub __ss_pad2: [u8; 128 - 2 * 4],
+                    #[cfg(target_pointer_width = "64")]
+                    pub __ss_pad2: [u8; 128 - 2 * 8],
                 }
                 #[repr(C)]
                 #[derive(Copy)] pub struct sockaddr_in {