diff options
| author | bors <bors@rust-lang.org> | 2015-08-13 07:07:34 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2015-08-13 07:07:34 +0000 |
| commit | ea3cd022ef77d384cfef15460560f8cb86ac41e2 (patch) | |
| tree | ac865207e0761fc04894469bc6f7d12624b4e274 /src | |
| parent | 2da80ef114f33250bd9873b53bcdf76ab36fe9cd (diff) | |
| parent | 872f8c3234ba02b32dd40a5be08f5b1328579197 (diff) | |
| download | rust-ea3cd022ef77d384cfef15460560f8cb86ac41e2.tar.gz rust-ea3cd022ef77d384cfef15460560f8cb86ac41e2.zip | |
Auto merge of #27762 - alexcrichton:fix-libc, r=aturon
The corrected signature of `ioctl` broke some crates on crates.io, and it's not currently worth the major version bump of libc, so for now keep the old signature around for crates.io builds only with a comment to remove it at a future date. This should allow libc on crates.io to update to the master version in-tree. I've verified that this was the only breakage of substance between the version libc is currently built with and today's master branch.
Diffstat (limited to 'src')
| -rw-r--r-- | src/liblibc/lib.rs | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/liblibc/lib.rs b/src/liblibc/lib.rs index 2718694490c..82edce6bdbd 100644 --- a/src/liblibc/lib.rs +++ b/src/liblibc/lib.rs @@ -6263,11 +6263,22 @@ pub mod funcs { #[cfg(any(target_os = "linux", target_os = "android"))] pub mod bsd44 { use types::common::c95::{c_void}; - use types::os::arch::c95::{c_uchar, c_int, c_ulong, size_t}; + use types::os::arch::c95::{c_uchar, c_int, size_t}; + #[cfg(not(feature = "cargo-build"))] + use types::os::arch::c95::c_ulong; extern { #[cfg(not(all(target_os = "android", target_arch = "aarch64")))] pub fn getdtablesize() -> c_int; + + // Note that the correct signature of ioctl broke some crates on + // crates.io, so for now we keep the broken signature for crates.io + // but we fix it locally in the main Rust distribution. Once a new + // major version of libc is released on crates.io this #[cfg] should + // go away. + #[cfg(feature = "cargo-build")] + pub fn ioctl(fd: c_int, request: c_int, ...) -> c_int; + #[cfg(not(feature = "cargo-build"))] pub fn ioctl(fd: c_int, request: c_ulong, ...) -> c_int; pub fn madvise(addr: *mut c_void, len: size_t, advice: c_int) -> c_int; |
