Skip to content

Commit

Permalink
Auto merge of #37055 - kali:master, r=alexcrichton
Browse files Browse the repository at this point in the history
use MSG_NOSIGNAL on all relevant platforms

followup #36824
  • Loading branch information
bors committed Oct 9, 2016
2 parents 9d4d0da + 14f9cbd commit a7bfb1a
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/liblibc
Submodule liblibc updated 44 files
+3 −0 .travis.yml
+2 −0 README.md
+1 −1 ci/docker/aarch64-unknown-linux-gnu/Dockerfile
+1 −1 ci/docker/arm-unknown-linux-gnueabihf/Dockerfile
+1 −1 ci/docker/i686-unknown-linux-gnu/Dockerfile
+14 −6 ci/docker/i686-unknown-linux-musl/Dockerfile
+1 −1 ci/docker/mips-unknown-linux-gnu/Dockerfile
+14 −0 ci/docker/mips-unknown-linux-musl/Dockerfile
+1 −1 ci/docker/mipsel-unknown-linux-musl/Dockerfile
+1 −1 ci/docker/powerpc-unknown-linux-gnu/Dockerfile
+1 −1 ci/docker/powerpc64-unknown-linux-gnu/Dockerfile
+1 −1 ci/docker/x86_64-unknown-linux-gnu/Dockerfile
+4 −4 ci/docker/x86_64-unknown-linux-musl/Dockerfile
+1 −1 ci/docker/x86_64-unknown-openbsd/Dockerfile
+7 −2 ci/run.sh
+14 −0 libc-test/Cargo.lock
+15 −0 libc-test/generate-files/Cargo.lock
+2 −0 src/unix/bsd/freebsdlike/dragonfly/mod.rs
+2 −0 src/unix/bsd/freebsdlike/freebsd/mod.rs
+2 −0 src/unix/bsd/freebsdlike/mod.rs
+2 −0 src/unix/bsd/mod.rs
+4 −2 src/unix/bsd/netbsdlike/mod.rs
+3 −0 src/unix/bsd/netbsdlike/netbsd/mod.rs
+2 −0 src/unix/bsd/netbsdlike/netbsd/other/b32/mod.rs
+2 −0 src/unix/bsd/netbsdlike/netbsd/other/b64/mod.rs
+13 −0 src/unix/bsd/netbsdlike/netbsd/other/mod.rs
+2 −0 src/unix/bsd/netbsdlike/openbsdlike/mod.rs
+2 −0 src/unix/haiku/b32.rs
+2 −0 src/unix/haiku/b64.rs
+746 −0 src/unix/haiku/mod.rs
+7 −2 src/unix/mod.rs
+0 −2 src/unix/notbsd/linux/mips.rs
+11 −1 src/unix/notbsd/linux/mod.rs
+0 −2 src/unix/notbsd/linux/musl/b32/arm.rs
+0 −2 src/unix/notbsd/linux/musl/b32/asmjs.rs
+0 −2 src/unix/notbsd/linux/musl/b32/mips.rs
+0 −2 src/unix/notbsd/linux/musl/b32/x86.rs
+0 −2 src/unix/notbsd/linux/musl/b64/mod.rs
+2 −0 src/unix/notbsd/linux/musl/mod.rs
+11 −0 src/unix/notbsd/linux/other/b64/x86_64.rs
+0 −2 src/unix/notbsd/linux/other/mod.rs
+0 −2 src/unix/notbsd/linux/s390x.rs
+2 −0 src/unix/notbsd/mod.rs
+6 −1 src/unix/solaris/mod.rs
12 changes: 9 additions & 3 deletions src/libstd/sys/common/net.rs
Expand Up @@ -42,10 +42,16 @@ use sys::net::netc::IPV6_LEAVE_GROUP as IPV6_DROP_MEMBERSHIP;
target_os = "solaris", target_os = "haiku")))]
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;
#[cfg(not(target_os = "linux"))]
const MSG_NOSIGNAL: 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: c_int = 0x0;

////////////////////////////////////////////////////////////////////////////////
// sockaddr and misc bindings
Expand Down
12 changes: 9 additions & 3 deletions src/libstd/sys/unix/ext/net.rs
Expand Up @@ -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 {
Expand Down

0 comments on commit a7bfb1a

Please sign in to comment.