diff --git a/src/socket.rs b/src/socket.rs index ce1bbbbb..90f70d0f 100644 --- a/src/socket.rs +++ b/src/socket.rs @@ -149,8 +149,8 @@ impl Socket { /// This function sets the same flags as in done for [`Socket::new`], /// [`Socket::pair_raw`] can be used if you don't want to set those flags. #[doc = man_links!(unix: socketpair(2))] - #[cfg(all(feature = "all", unix))] - #[cfg_attr(docsrs, doc(cfg(all(feature = "all", unix))))] + #[cfg(all(feature = "all", unix, not(target_os = "vita")))] + #[cfg_attr(docsrs, doc(cfg(all(feature = "all", unix, not(target_os = "vita")))))] pub fn pair( domain: Domain, ty: Type, @@ -166,8 +166,8 @@ impl Socket { /// Creates a pair of sockets which are connected to each other. /// /// This function corresponds to `socketpair(2)`. - #[cfg(all(feature = "all", unix))] - #[cfg_attr(docsrs, doc(cfg(all(feature = "all", unix))))] + #[cfg(all(feature = "all", unix, not(target_os = "vita")))] + #[cfg_attr(docsrs, doc(cfg(all(feature = "all", unix, not(target_os = "vita")))))] pub fn pair_raw( domain: Domain, ty: Type, @@ -1826,13 +1826,23 @@ impl Socket { /// supported Unix operating systems. #[cfg(all( feature = "all", - not(any(windows, target_os = "haiku", target_os = "openbsd")) + not(any( + windows, + target_os = "haiku", + target_os = "openbsd", + target_os = "vita" + )) ))] #[cfg_attr( docsrs, doc(cfg(all( feature = "all", - not(any(windows, target_os = "haiku", target_os = "openbsd")) + not(any( + windows, + target_os = "haiku", + target_os = "openbsd", + target_os = "vita" + )) ))) )] pub fn keepalive_time(&self) -> io::Result { diff --git a/src/sys/unix.rs b/src/sys/unix.rs index ad9d20c1..d95ce09c 100644 --- a/src/sys/unix.rs +++ b/src/sys/unix.rs @@ -851,8 +851,8 @@ pub(crate) fn socket(family: c_int, ty: c_int, protocol: c_int) -> io::Result io::Result<[Socket; 2]> { let mut fds = [0, 0]; syscall!(socketpair(family, ty, protocol, fds.as_mut_ptr())).map(|_| fds) @@ -1416,7 +1416,7 @@ impl crate::Socket { ), allow(rustdoc::broken_intra_doc_links) )] - #[cfg(feature = "all")] + #[cfg(all(feature = "all", not(target_os = "vita")))] #[cfg_attr(docsrs, doc(cfg(all(feature = "all", unix))))] pub fn set_cloexec(&self, close_on_exec: bool) -> io::Result<()> { self._set_cloexec(close_on_exec) diff --git a/tests/socket.rs b/tests/socket.rs index ddcd1d96..0deff515 100644 --- a/tests/socket.rs +++ b/tests/socket.rs @@ -307,7 +307,7 @@ pub fn assert_nonblocking(_: &Socket, _: bool) { // No way to get this information... } -#[cfg(all(unix, feature = "all"))] +#[cfg(all(unix, feature = "all", not(target_os = "vita")))] #[test] fn set_cloexec() { let socket = Socket::new(Domain::IPV4, Type::STREAM, None).unwrap(); @@ -494,7 +494,7 @@ fn connect_timeout_valid() { } #[test] -#[cfg(all(feature = "all", unix))] +#[cfg(all(feature = "all", unix, not(target_os = "vita")))] fn pair() { let (mut a, mut b) = Socket::pair(Domain::UNIX, Type::STREAM, None).unwrap(); let _ = a.write(DATA).unwrap(); @@ -870,7 +870,12 @@ fn tcp_keepalive() { #[cfg(all( feature = "all", - not(any(windows, target_os = "haiku", target_os = "openbsd")) + not(any( + windows, + target_os = "haiku", + target_os = "openbsd", + target_os = "vita" + )) ))] assert_eq!(socket.keepalive_time().unwrap(), Duration::from_secs(200));