diff options
author | Carl Lerche <me@carllerche.com> | 2015-10-20 14:53:46 -0700 |
---|---|---|
committer | Carl Lerche <me@carllerche.com> | 2015-10-20 14:53:46 -0700 |
commit | ac0750628879719b216e04f9248df8f5a5d10b4b (patch) | |
tree | cc9f47f16632cbfc729cc1e46b4cfd5351b1d19c /test/test_signalfd.rs | |
parent | 2851a3549bf5593f221bd3653e3299f1486ef5a0 (diff) | |
download | nix-ac0750628879719b216e04f9248df8f5a5d10b4b.zip |
Only run signalfd tests when feature is set
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() {} |