diff options
| author | Florian Hahn <flo@fhahn.com> | 2015-12-18 13:29:49 +0100 |
|---|---|---|
| committer | Florian Hahn <flo@fhahn.com> | 2015-12-29 16:07:01 +0100 |
| commit | e27cbeff370897b8450caa204c08049651a10c13 (patch) | |
| tree | 471ed007f694634c94b22bfcc5ff4aa2bcc8be16 /src/libstd/sys/unix/mod.rs | |
| parent | 27a1834ce522e3ec7fe4726b1661de16ee30c503 (diff) | |
| download | rust-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.rs | 5 |
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 { |
