summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPaul Osborne <osbpau@gmail.com>2015-07-24 01:50:19 -0500
committerPaul Osborne <Paul.Osborne@digi.com>2015-08-12 19:29:21 -0500
commit1ed5a9b997e75783baa45a041c462f9aeb069ce8 (patch)
treee1c625992d9b00bab5d1a37eab904c7f0c25e212 /src
parent553b51d5bb7a5c2bd3abc26287a60822531aff0d (diff)
downloadnix-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')
-rw-r--r--src/sys/ioctl/mod.rs8
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;