Skip to content

Commit bd66f57

Browse files
committed
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.
1 parent 3e7385a commit bd66f57

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/liblibc/lib.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,10 @@ pub mod types {
307307
#[derive(Copy)] pub struct sockaddr_storage {
308308
pub ss_family: sa_family_t,
309309
pub __ss_align: isize,
310-
pub __ss_pad2: [u8; 128 - 2 * (::core::isize::BYTES as usize)],
310+
#[cfg(target_pointer_width = "32")]
311+
pub __ss_pad2: [u8; 128 - 2 * 4],
312+
#[cfg(target_pointer_width = "64")]
313+
pub __ss_pad2: [u8; 128 - 2 * 8],
311314
}
312315
#[repr(C)]
313316
#[derive(Copy)] pub struct sockaddr_in {

0 commit comments

Comments
 (0)