1
Fork 0

Remove target_os, which does not have SO_PASSCRED constant in libc

This commit is contained in:
LinkTed 2020-09-20 15:04:09 +02:00
parent 1f6d7dcc0a
commit d30508f95c
3 changed files with 5 additions and 56 deletions

View file

@ -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()

View file

@ -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()

View file

@ -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 {