Skip to content

Commit

Permalink
add poll module for all platforms
Browse files Browse the repository at this point in the history
  • Loading branch information
ndusart committed Jul 25, 2017
1 parent 5d9e1ed commit 6659491
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ This project adheres to [Semantic Versioning](http://semver.org/).
- On Linux and Android, added support for receiving `PTRACE_O_TRACESYSGOOD`
events from `wait` and `waitpid` using `WaitStatus::PtraceSyscall`
([#566](https://github.com/nix-rust/nix/pull/566)).
- Added `nix::poll` module for all platforms
([#672](https://github.com/nix-rust/nix/pull/672))
- Added `nix::ppoll` function for FreeBSD and DragonFly
([#672](https://github.com/nix-rust/nix/pull/672))

### Changed
- The `ioctl!` macro and its variants now allow the generated functions to have
Expand Down
1 change: 0 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ pub mod mqueue;

pub mod pty;

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

pub mod net;
Expand Down
6 changes: 3 additions & 3 deletions src/poll.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#[cfg(any(target_os = "linux", target_os = "android"))]
#[cfg(any(target_os = "linux", target_os = "android", target_os = "freebsd", target_os = "dragonfly"))]
use sys::time::TimeSpec;
#[cfg(any(target_os = "linux", target_os = "android"))]
#[cfg(any(target_os = "linux", target_os = "android", target_os = "freebsd", target_os = "dragonfly"))]
use sys::signal::SigSet;

use libc;
Expand Down Expand Up @@ -53,7 +53,7 @@ pub fn poll(fds: &mut [PollFd], timeout: libc::c_int) -> Result<libc::c_int> {
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<libc::c_int> {


Expand Down
1 change: 0 additions & 1 deletion test/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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"))]
Expand Down

0 comments on commit 6659491

Please sign in to comment.