diff --git a/.cargo/config b/.cargo/config new file mode 100644 index 0000000000..78fb958f4f --- /dev/null +++ b/.cargo/config @@ -0,0 +1,3 @@ +[target.arm-linux-androideabi] +ar = "/home/nicolas/android/android-24-toolchain/bin/arm-linux-androideabi-ar" +linker = "/home/nicolas/android/android-24-toolchain/bin/arm-linux-androideabi-clang" diff --git a/Cargo.toml b/Cargo.toml index 64a212f64c..3a137f40fa 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -22,7 +22,7 @@ preadv_pwritev = [] signalfd = [] [dependencies] -libc = "0.2.25" +libc = { git = "https://github.com/ndusart/libc" } bitflags = "0.9" cfg-if = "0.1.0" void = "1.0.2" diff --git a/src/lib.rs b/src/lib.rs index f0cdb581ee..eee0f2de9f 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -46,7 +46,6 @@ pub mod mqueue; pub mod pty; -#[cfg(any(target_os = "linux", target_os = "macos"))] pub mod poll; pub mod net; @@ -96,7 +95,7 @@ pub enum Error { /// The operation involved a conversion to Rust's native String type, which failed because the /// string did not contain all valid UTF-8. InvalidUtf8, - /// The operation is not supported by Nix, in this instance either use the libc bindings or + /// The operation is not supported by Nix, in this instance either use the libc bindings or /// consult the module documentation to see if there is a more appropriate interface available. UnsupportedOperation, } diff --git a/src/poll.rs b/src/poll.rs index afc5bd9c95..7a81755a66 100644 --- a/src/poll.rs +++ b/src/poll.rs @@ -53,7 +53,7 @@ pub fn poll(fds: &mut [PollFd], timeout: libc::c_int) -> Result { Errno::result(res) } -#[cfg(any(target_os = "linux", target_os = "android"))] +#[cfg(any(target_os = "linux", target_os = "android", target_os = "freebsd", target_os = "dragonfly"))] pub fn ppoll(fds: &mut [PollFd], timeout: TimeSpec, sigmask: SigSet) -> Result { diff --git a/test/test.rs b/test/test.rs index 2cf3036054..2791e9354d 100644 --- a/test/test.rs +++ b/test/test.rs @@ -15,7 +15,6 @@ mod test_fcntl; mod test_mq; mod test_net; mod test_nix_path; -#[cfg(any(target_os = "linux", target_os = "macos"))] mod test_poll; mod test_pty; #[cfg(any(target_os = "linux", target_os = "android"))]