use MSG_NOSIGNAL on all relevant platforms
This commit is contained in:
parent
b98cc352cb
commit
14f9cbdfd5
3 changed files with 19 additions and 7 deletions
|
@ -1 +1 @@
|
||||||
Subproject commit b474785561d58efbd27add9d22339dcabad742ad
|
Subproject commit 5a17b4a733a22d445fdd63326f826fcd8a584328
|
|
@ -42,10 +42,16 @@ use sys::net::netc::IPV6_LEAVE_GROUP as IPV6_DROP_MEMBERSHIP;
|
||||||
target_os = "solaris", target_os = "haiku")))]
|
target_os = "solaris", target_os = "haiku")))]
|
||||||
use sys::net::netc::IPV6_DROP_MEMBERSHIP;
|
use sys::net::netc::IPV6_DROP_MEMBERSHIP;
|
||||||
|
|
||||||
#[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;
|
use libc::MSG_NOSIGNAL;
|
||||||
#[cfg(not(target_os = "linux"))]
|
#[cfg(not(any(target_os = "linux", target_os = "android",
|
||||||
const MSG_NOSIGNAL: c_int = 0x0; // unused dummy value
|
target_os = "dragonfly", target_os = "freebsd",
|
||||||
|
target_os = "openbsd", target_os = "netbsd",
|
||||||
|
target_os = "haiku", target_os = "bitrig")))]
|
||||||
|
const MSG_NOSIGNAL: c_int = 0x0;
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// sockaddr and misc bindings
|
// sockaddr and misc bindings
|
||||||
|
|
|
@ -28,10 +28,16 @@ use sys::cvt;
|
||||||
use sys::net::Socket;
|
use sys::net::Socket;
|
||||||
use sys_common::{AsInner, FromInner, IntoInner};
|
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;
|
use libc::MSG_NOSIGNAL;
|
||||||
#[cfg(not(target_os = "linux"))]
|
#[cfg(not(any(target_os = "linux", target_os = "android",
|
||||||
const MSG_NOSIGNAL: libc::c_int = 0x0; // unused dummy value
|
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 {
|
fn sun_path_offset() -> usize {
|
||||||
unsafe {
|
unsafe {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue