diff options
| author | Mathieu Poumeyrol <kali@zoy.org> | 2016-10-09 13:01:29 +0200 |
|---|---|---|
| committer | Mathieu Poumeyrol <kali@zoy.org> | 2016-10-09 13:01:29 +0200 |
| commit | 14f9cbdfd596390e039a7af8ca3003662fecc28e (patch) | |
| tree | 8f71883987d644a2499c9c0c24e830b9a2685ad5 /src/libstd/sys/unix | |
| parent | b98cc352cbb428f3c9a0e608bc57a83109a26a57 (diff) | |
| download | rust-14f9cbdfd596390e039a7af8ca3003662fecc28e.tar.gz rust-14f9cbdfd596390e039a7af8ca3003662fecc28e.zip | |
use MSG_NOSIGNAL on all relevant platforms
Diffstat (limited to 'src/libstd/sys/unix')
| -rw-r--r-- | src/libstd/sys/unix/ext/net.rs | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/libstd/sys/unix/ext/net.rs b/src/libstd/sys/unix/ext/net.rs index 622fd4b85a5..80f53da1cef 100644 --- a/src/libstd/sys/unix/ext/net.rs +++ b/src/libstd/sys/unix/ext/net.rs @@ -28,10 +28,16 @@ use sys::cvt; use sys::net::Socket; use sys_common::{AsInner, FromInner, IntoInner}; -#[cfg(target_os = "linux")] +#[cfg(any(target_os = "linux", target_os = "android", + target_os = "dragonfly", target_os = "freebsd", + target_os = "openbsd", target_os = "netbsd", + target_os = "haiku", target_os = "bitrig"))] use libc::MSG_NOSIGNAL; -#[cfg(not(target_os = "linux"))] -const MSG_NOSIGNAL: libc::c_int = 0x0; // unused dummy value +#[cfg(not(any(target_os = "linux", target_os = "android", + target_os = "dragonfly", target_os = "freebsd", + target_os = "openbsd", target_os = "netbsd", + target_os = "haiku", target_os = "bitrig")))] +const MSG_NOSIGNAL: libc::c_int = 0x0; fn sun_path_offset() -> usize { unsafe { |
