summary refs log tree commit diff
path: root/src/liblibc
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2015-03-28 10:49:45 -0700
committerAlex Crichton <alex@alexcrichton.com>2015-03-28 10:49:45 -0700
commitbd66f57e469b89a0b8ffbe273cac26c02cdf9874 (patch)
tree64fbb23d9529b38595475ecbbb201210f63318e3 /src/liblibc
parent3e7385aae9d58c8e12137d7c07aad48551048c13 (diff)
downloadrust-bd66f57e469b89a0b8ffbe273cac26c02cdf9874.tar.gz
rust-bd66f57e469b89a0b8ffbe273cac26c02cdf9874.zip
libc: Don't use unstable apis
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/liblibc')
-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 {