Skip to content

Commit 94d3839

Browse files
committed
add poll module for all platforms
1 parent 17f87d4 commit 94d3839

File tree

5 files changed

+6
-5
lines changed

5 files changed

+6
-5
lines changed

.cargo/config

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[target.arm-linux-androideabi]
2+
ar = "/home/nicolas/android/android-24-toolchain/bin/arm-linux-androideabi-ar"
3+
linker = "/home/nicolas/android/android-24-toolchain/bin/arm-linux-androideabi-clang"

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ preadv_pwritev = []
2222
signalfd = []
2323

2424
[dependencies]
25-
libc = "0.2.25"
25+
libc = { git = "https://github.com/ndusart/libc" }
2626
bitflags = "0.9"
2727
cfg-if = "0.1.0"
2828
void = "1.0.2"

src/lib.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ pub mod mqueue;
4646

4747
pub mod pty;
4848

49-
#[cfg(any(target_os = "linux", target_os = "macos"))]
5049
pub mod poll;
5150

5251
pub mod net;
@@ -96,7 +95,7 @@ pub enum Error {
9695
/// The operation involved a conversion to Rust's native String type, which failed because the
9796
/// string did not contain all valid UTF-8.
9897
InvalidUtf8,
99-
/// The operation is not supported by Nix, in this instance either use the libc bindings or
98+
/// The operation is not supported by Nix, in this instance either use the libc bindings or
10099
/// consult the module documentation to see if there is a more appropriate interface available.
101100
UnsupportedOperation,
102101
}

src/poll.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ pub fn poll(fds: &mut [PollFd], timeout: libc::c_int) -> Result<libc::c_int> {
5353
Errno::result(res)
5454
}
5555

56-
#[cfg(any(target_os = "linux", target_os = "android"))]
56+
#[cfg(any(target_os = "linux", target_os = "android", target_os = "freebsd", target_os = "dragonfly"))]
5757
pub fn ppoll(fds: &mut [PollFd], timeout: TimeSpec, sigmask: SigSet) -> Result<libc::c_int> {
5858

5959

test/test.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ mod test_fcntl;
1515
mod test_mq;
1616
mod test_net;
1717
mod test_nix_path;
18-
#[cfg(any(target_os = "linux", target_os = "macos"))]
1918
mod test_poll;
2019
mod test_pty;
2120
#[cfg(any(target_os = "linux", target_os = "android"))]

0 commit comments

Comments
 (0)