summaryrefslogtreecommitdiff
path: root/test/test_signalfd.rs
diff options
context:
space:
mode:
authorCarl Lerche <me@carllerche.com>2015-10-20 14:53:46 -0700
committerCarl Lerche <me@carllerche.com>2015-10-20 14:53:46 -0700
commitac0750628879719b216e04f9248df8f5a5d10b4b (patch)
treecc9f47f16632cbfc729cc1e46b4cfd5351b1d19c /test/test_signalfd.rs
parent2851a3549bf5593f221bd3653e3299f1486ef5a0 (diff)
downloadnix-ac0750628879719b216e04f9248df8f5a5d10b4b.zip
Only run signalfd tests when feature is set
Diffstat (limited to 'test/test_signalfd.rs')
-rw-r--r--test/test_signalfd.rs9
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() {}