diff options
author | Paul Osborne <osbpau@gmail.com> | 2015-07-24 01:50:19 -0500 |
---|---|---|
committer | Paul Osborne <Paul.Osborne@digi.com> | 2015-08-12 19:29:21 -0500 |
commit | 1ed5a9b997e75783baa45a041c462f9aeb069ce8 (patch) | |
tree | e1c625992d9b00bab5d1a37eab904c7f0c25e212 /src/sys | |
parent | 553b51d5bb7a5c2bd3abc26287a60822531aff0d (diff) | |
download | nix-1ed5a9b997e75783baa45a041c462f9aeb069ce8.zip |
ioctl: reintroduce libc ioctl workaround until we can use updated liblibc
This PR fixes the issue upstream https://github.com/rust-lang/rust/pull/26809
but no version 0.2.0 of the crate has been published as of yet.
Signed-off-by: Paul Osborne <osbpau@gmail.com>
Diffstat (limited to 'src/sys')
-rw-r--r-- | src/sys/ioctl/mod.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/sys/ioctl/mod.rs b/src/sys/ioctl/mod.rs index eea3f139..a4e51cbd 100644 --- a/src/sys/ioctl/mod.rs +++ b/src/sys/ioctl/mod.rs @@ -104,8 +104,12 @@ mod platform; pub use self::platform::*; +// liblibc has the wrong decl for linux :| hack until #26809 lands. +extern "C" { + #[doc(hidden)] + pub fn ioctl(fd: libc::c_int, req: libc::c_ulong, ...) -> libc::c_int; +} + /// A hack to get the macros to work nicely. #[doc(hidden)] pub use ::libc as libc; -#[doc(hidden)] -pub use ::libc::funcs::bsd44::ioctl; |