about summary refs log tree commit diff
path: root/src/libstd/sys/unix/mod.rs
diff options
context:
space:
mode:
authorFlorian Hahn <flo@fhahn.com>2015-12-18 13:29:49 +0100
committerFlorian Hahn <flo@fhahn.com>2015-12-29 16:07:01 +0100
commite27cbeff370897b8450caa204c08049651a10c13 (patch)
tree471ed007f694634c94b22bfcc5ff4aa2bcc8be16 /src/libstd/sys/unix/mod.rs
parent27a1834ce522e3ec7fe4726b1661de16ee30c503 (diff)
downloadrust-e27cbeff370897b8450caa204c08049651a10c13.tar.gz
rust-e27cbeff370897b8450caa204c08049651a10c13.zip
Fix warnings when compiling stdlib with --test
Diffstat (limited to 'src/libstd/sys/unix/mod.rs')
-rw-r--r--src/libstd/sys/unix/mod.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/libstd/sys/unix/mod.rs b/src/libstd/sys/unix/mod.rs
index 68b0c3d6b0e..929fd2fb0c3 100644
--- a/src/libstd/sys/unix/mod.rs
+++ b/src/libstd/sys/unix/mod.rs
@@ -45,7 +45,7 @@ pub mod thread_local;
 pub mod time;
 pub mod stdio;
 
-#[cfg(not(target_os = "nacl"))]
+#[cfg(not(any(target_os = "nacl", test)))]
 pub fn init() {
     use libc::signal;
     // By default, some platforms will send a *signal* when an EPIPE error
@@ -59,7 +59,8 @@ pub fn init() {
         assert!(signal(libc::SIGPIPE, libc::SIG_IGN) != !0);
     }
 }
-#[cfg(target_os = "nacl")]
+
+#[cfg(all(target_os = "nacl", not(test)))]
 pub fn init() { }
 
 pub fn decode_error_kind(errno: i32) -> ErrorKind {