]> git.lizzy.rs Git - rust.git/commitdiff
Rollup merge of #23811 - alexcrichton:libc-stable, r=Manishearth
authorManish Goregaokar <manishsmail@gmail.com>
Sun, 29 Mar 2015 12:52:15 +0000 (18:22 +0530)
committerManish Goregaokar <manishsmail@gmail.com>
Sun, 29 Mar 2015 12:52:15 +0000 (18:22 +0530)
Right now the `std::isize::BYTES` typedef is `#[unstable]`, but liblibc is using
this, preventing it from compiling on stable Rust.

src/liblibc/lib.rs

index 7174b2d2c29fed2016fef4f8f478e20b5fbb0971..b7162c4a177d6f0457bb30a40f729d19da2f7f38 100644 (file)
@@ -307,7 +307,10 @@ pub mod bsd44 {
                 #[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 {