diff options
Diffstat (limited to 'test/test_signalfd.rs')
-rw-r--r-- | test/test_signalfd.rs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/test/test_signalfd.rs b/test/test_signalfd.rs index 2ca5b61c..fb28e2ad 100644 --- a/test/test_signalfd.rs +++ b/test/test_signalfd.rs @@ -1,13 +1,12 @@ -#![cfg(feature = "signalfd")] - extern crate nix; use nix::unistd; -#[cfg(any(target_os = "linux", target_os = "android"))] +#[cfg(feature = "signalfd")] + use nix::sys::signalfd::*; -#[cfg(any(target_os = "linux", target_os = "android"))] +#[cfg(feature = "signalfd")] fn main() { let mut mask = SigSet::empty(); mask.add(signal::SIGUSR1).unwrap(); @@ -28,5 +27,5 @@ fn main() { assert_eq!(info.ssi_signo as i32, signal::SIGUSR1); } -#[cfg(not(any(target_os = "linux", target_os = "android")))] +#[cfg(not(feature = "signalfd"))] fn main() {} |