about summary refs log tree commit diff
path: root/library/std/src
diff options
context:
space:
mode:
authorLinkTed <LinkTed@users.noreply.github.com>2020-09-20 15:04:09 +0200
committerLinkTed <LinkTed@users.noreply.github.com>2020-10-10 15:19:13 +0200
commitd30508f95c7a6cf371db5413b04322508d848c0e (patch)
tree4d70600f067ff9f0db5e3c896614044c53f880d0 /library/std/src
parent1f6d7dcc0a917617eb135a39b4687c3a4a4e3e0b (diff)
downloadrust-d30508f95c7a6cf371db5413b04322508d848c0e.tar.gz
rust-d30508f95c7a6cf371db5413b04322508d848c0e.zip
Remove `target_os`, which does not have `SO_PASSCRED` constant in `libc`
Diffstat (limited to 'library/std/src')
-rw-r--r--library/std/src/sys/unix/ext/net/datagram.rs30
-rw-r--r--library/std/src/sys/unix/ext/net/stream.rs30
-rw-r--r--library/std/src/sys/unix/ext/net/tests.rs1
3 files changed, 5 insertions, 56 deletions
diff --git a/library/std/src/sys/unix/ext/net/datagram.rs b/library/std/src/sys/unix/ext/net/datagram.rs
index 52cb3c0d904..46061200be7 100644
--- a/library/std/src/sys/unix/ext/net/datagram.rs
+++ b/library/std/src/sys/unix/ext/net/datagram.rs
@@ -748,20 +748,7 @@ impl UnixDatagram {
     ///     Ok(())
     /// }
     /// ```
-    #[cfg(any(
-        doc,
-        target_os = "android",
-        target_os = "dragonfly",
-        target_os = "emscripten",
-        target_os = "freebsd",
-        target_os = "fuchsia",
-        target_os = "ios",
-        target_os = "linux",
-        target_os = "macos",
-        target_os = "netbsd",
-        target_os = "openbsd",
-        target_env = "uclibc",
-    ))]
+    #[cfg(any(doc, target_os = "android", target_os = "emscripten", target_os = "linux",))]
     #[unstable(feature = "unix_socket_ancillary_data", issue = "76915")]
     pub fn set_passcred(&self, passcred: bool) -> io::Result<()> {
         self.0.set_passcred(passcred)
@@ -773,20 +760,7 @@ impl UnixDatagram {
     /// Get the socket option `SO_PASSCRED`.
     ///
     /// [`set_passcred`]: UnixDatagram::set_passcred
-    #[cfg(any(
-        doc,
-        target_os = "android",
-        target_os = "dragonfly",
-        target_os = "emscripten",
-        target_os = "freebsd",
-        target_os = "fuchsia",
-        target_os = "ios",
-        target_os = "linux",
-        target_os = "macos",
-        target_os = "netbsd",
-        target_os = "openbsd",
-        target_env = "uclibc",
-    ))]
+    #[cfg(any(doc, target_os = "android", target_os = "emscripten", target_os = "linux",))]
     #[unstable(feature = "unix_socket_ancillary_data", issue = "76915")]
     pub fn passcred(&self) -> io::Result<bool> {
         self.0.passcred()
diff --git a/library/std/src/sys/unix/ext/net/stream.rs b/library/std/src/sys/unix/ext/net/stream.rs
index 21b13a083a0..783a50e09b2 100644
--- a/library/std/src/sys/unix/ext/net/stream.rs
+++ b/library/std/src/sys/unix/ext/net/stream.rs
@@ -375,20 +375,7 @@ impl UnixStream {
     ///     Ok(())
     /// }
     /// ```
-    #[cfg(any(
-        doc,
-        target_os = "android",
-        target_os = "dragonfly",
-        target_os = "emscripten",
-        target_os = "freebsd",
-        target_os = "fuchsia",
-        target_os = "ios",
-        target_os = "linux",
-        target_os = "macos",
-        target_os = "netbsd",
-        target_os = "openbsd",
-        target_env = "uclibc",
-    ))]
+    #[cfg(any(doc, target_os = "android", target_os = "emscripten", target_os = "linux",))]
     #[unstable(feature = "unix_socket_ancillary_data", issue = "76915")]
     pub fn set_passcred(&self, passcred: bool) -> io::Result<()> {
         self.0.set_passcred(passcred)
@@ -400,20 +387,7 @@ impl UnixStream {
     /// Get the socket option `SO_PASSCRED`.
     ///
     /// [`set_passcred`]: UnixStream::set_passcred
-    #[cfg(any(
-        doc,
-        target_os = "android",
-        target_os = "dragonfly",
-        target_os = "emscripten",
-        target_os = "freebsd",
-        target_os = "fuchsia",
-        target_os = "ios",
-        target_os = "linux",
-        target_os = "macos",
-        target_os = "netbsd",
-        target_os = "openbsd",
-        target_env = "uclibc",
-    ))]
+    #[cfg(any(doc, target_os = "android", target_os = "emscripten", target_os = "linux",))]
     #[unstable(feature = "unix_socket_ancillary_data", issue = "76915")]
     pub fn passcred(&self) -> io::Result<bool> {
         self.0.passcred()
diff --git a/library/std/src/sys/unix/ext/net/tests.rs b/library/std/src/sys/unix/ext/net/tests.rs
index 9f34059d011..abf45ad2d1b 100644
--- a/library/std/src/sys/unix/ext/net/tests.rs
+++ b/library/std/src/sys/unix/ext/net/tests.rs
@@ -491,6 +491,7 @@ fn test_send_vectored_fds_unix_stream() {
     }
 }
 
+#[cfg(any(test, target_os = "android", target_os = "emscripten", target_os = "linux",))]
 #[test]
 fn test_send_vectored_with_ancillary_to_unix_datagram() {
     fn getpid() -> libc::pid_t {