diff --git a/src/lib.rs b/src/lib.rs index f368fc5739..f3724ec3ed 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -16,12 +16,17 @@ extern crate bitflags; #[macro_use] extern crate cfg_if; -pub extern crate libc; - #[cfg(test)] extern crate nix_test as nixtest; -// Re-exports +// In rust 1.8+ this should be `pub extern crate libc` but prior +// to https://github.com/rust-lang/rust/issues/26775 being resolved +// it is necessary to get a little creative. +pub mod libc { + extern crate libc; + pub use self::libc::*; +} + pub use libc::{c_int, c_void}; pub use errno::Errno;