Skip to content

Commit f14c586

Browse files
committed
add poll module for all platforms
1 parent 5d9e1ed commit f14c586

File tree

4 files changed

+7
-5
lines changed

4 files changed

+7
-5
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ This project adheres to [Semantic Versioning](http://semver.org/).
3131
- On Linux and Android, added support for receiving `PTRACE_O_TRACESYSGOOD`
3232
events from `wait` and `waitpid` using `WaitStatus::PtraceSyscall`
3333
([#566](https://github.com/nix-rust/nix/pull/566)).
34+
- Added `nix::poll` module for all platforms
35+
([#672](https://github.com/nix-rust/nix/pull/672))
36+
- Added `nix::ppoll` function for FreeBSD and DragonFly
37+
([#672](https://github.com/nix-rust/nix/pull/672))
3438

3539
### Changed
3640
- The `ioctl!` macro and its variants now allow the generated functions to have

src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ pub mod mqueue;
3939

4040
pub mod pty;
4141

42-
#[cfg(any(target_os = "linux", target_os = "macos"))]
4342
pub mod poll;
4443

4544
pub mod net;

src/poll.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#[cfg(any(target_os = "linux", target_os = "android"))]
1+
#[cfg(any(target_os = "android", target_os = "dragonfly", target_os = "freebsd", target_os = "linux"))]
22
use sys::time::TimeSpec;
3-
#[cfg(any(target_os = "linux", target_os = "android"))]
3+
#[cfg(any(target_os = "android", target_os = "dragonfly", target_os = "freebsd", target_os = "linux"))]
44
use sys::signal::SigSet;
55

66
use libc;
@@ -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 = "android", target_os = "dragonfly", target_os = "freebsd", target_os = "linux"))]
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)