diff --git a/src/lib.rs b/src/lib.rs index 4f6bd789..3a8445b8 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -514,6 +514,7 @@ impl TcpKeepalive { target_os = "fuchsia", target_os = "illumos", target_os = "ios", + target_os = "visionos", target_os = "linux", target_os = "macos", target_os = "netbsd", @@ -530,6 +531,7 @@ impl TcpKeepalive { target_os = "fuchsia", target_os = "illumos", target_os = "ios", + target_os = "visionos", target_os = "linux", target_os = "macos", target_os = "netbsd", @@ -558,6 +560,7 @@ impl TcpKeepalive { target_os = "fuchsia", target_os = "illumos", target_os = "ios", + target_os = "visionos", target_os = "linux", target_os = "macos", target_os = "netbsd", @@ -576,6 +579,7 @@ impl TcpKeepalive { target_os = "fuchsia", target_os = "illumos", target_os = "ios", + target_os = "visionos", target_os = "linux", target_os = "macos", target_os = "netbsd", diff --git a/src/sockaddr.rs b/src/sockaddr.rs index 6df22fdc..ae3c7fea 100644 --- a/src/sockaddr.rs +++ b/src/sockaddr.rs @@ -291,6 +291,7 @@ impl From for SockAddr { target_os = "haiku", target_os = "hermit", target_os = "ios", + target_os = "visionos", target_os = "macos", target_os = "netbsd", target_os = "nto", @@ -334,6 +335,7 @@ impl From for SockAddr { target_os = "haiku", target_os = "hermit", target_os = "ios", + target_os = "visionos", target_os = "macos", target_os = "netbsd", target_os = "nto", @@ -358,6 +360,7 @@ impl fmt::Debug for SockAddr { target_os = "haiku", target_os = "hermit", target_os = "ios", + target_os = "visionos", target_os = "macos", target_os = "netbsd", target_os = "nto", diff --git a/src/socket.rs b/src/socket.rs index 3291707c..b458fb15 100644 --- a/src/socket.rs +++ b/src/socket.rs @@ -801,6 +801,7 @@ fn set_common_flags(socket: Socket) -> io::Result { // On Apple platforms set `NOSIGPIPE`. #[cfg(any( target_os = "ios", + target_os = "visionos", target_os = "macos", target_os = "tvos", target_os = "watchos", @@ -1947,6 +1948,7 @@ impl Socket { target_os = "fuchsia", target_os = "illumos", target_os = "ios", + target_os = "visionos", target_os = "linux", target_os = "macos", target_os = "netbsd", @@ -1965,6 +1967,7 @@ impl Socket { target_os = "fuchsia", target_os = "illumos", target_os = "ios", + target_os = "visionos", target_os = "linux", target_os = "macos", target_os = "netbsd", @@ -1994,6 +1997,7 @@ impl Socket { target_os = "fuchsia", target_os = "illumos", target_os = "ios", + target_os = "visionos", target_os = "linux", target_os = "macos", target_os = "netbsd", @@ -2012,6 +2016,7 @@ impl Socket { target_os = "fuchsia", target_os = "illumos", target_os = "ios", + target_os = "visionos", target_os = "linux", target_os = "macos", target_os = "netbsd", diff --git a/src/sys/unix.rs b/src/sys/unix.rs index 562cd60f..1aa8cd12 100644 --- a/src/sys/unix.rs +++ b/src/sys/unix.rs @@ -18,6 +18,7 @@ use std::net::{Ipv4Addr, Ipv6Addr}; feature = "all", any( target_os = "ios", + target_os = "visionos", target_os = "macos", target_os = "tvos", target_os = "watchos", @@ -31,6 +32,7 @@ use std::num::NonZeroU32; target_os = "android", target_os = "freebsd", target_os = "ios", + target_os = "visionos", target_os = "linux", target_os = "macos", target_os = "tvos", @@ -46,6 +48,7 @@ use std::os::unix::ffi::OsStrExt; target_os = "android", target_os = "freebsd", target_os = "ios", + target_os = "visionos", target_os = "linux", target_os = "macos", target_os = "tvos", @@ -63,6 +66,7 @@ use std::{io, slice}; #[cfg(not(any( target_os = "ios", + target_os = "visionos", target_os = "macos", target_os = "tvos", target_os = "watchos", @@ -160,6 +164,7 @@ pub(crate) use libc::IP_RECVTOS; pub(crate) use libc::IP_TOS; #[cfg(not(any( target_os = "ios", + target_os = "visionos", target_os = "macos", target_os = "tvos", target_os = "watchos", @@ -167,6 +172,7 @@ pub(crate) use libc::IP_TOS; pub(crate) use libc::SO_LINGER; #[cfg(any( target_os = "ios", + target_os = "visionos", target_os = "macos", target_os = "tvos", target_os = "watchos", @@ -200,6 +206,7 @@ pub(crate) use libc::{ target_os = "haiku", target_os = "illumos", target_os = "ios", + target_os = "visionos", target_os = "macos", target_os = "netbsd", target_os = "nto", @@ -215,6 +222,7 @@ pub(crate) use libc::{IPV6_ADD_MEMBERSHIP, IPV6_DROP_MEMBERSHIP}; target_os = "haiku", target_os = "illumos", target_os = "ios", + target_os = "visionos", target_os = "macos", target_os = "netbsd", target_os = "openbsd", @@ -234,6 +242,7 @@ pub(crate) use libc::{ target_os = "fuchsia", target_os = "illumos", target_os = "ios", + target_os = "visionos", target_os = "linux", target_os = "macos", target_os = "netbsd", @@ -248,6 +257,7 @@ pub(crate) type Bool = c_int; #[cfg(any( target_os = "ios", + target_os = "visionos", target_os = "macos", target_os = "nto", target_os = "tvos", @@ -257,6 +267,7 @@ use libc::TCP_KEEPALIVE as KEEPALIVE_TIME; #[cfg(not(any( target_os = "haiku", target_os = "ios", + target_os = "visionos", target_os = "macos", target_os = "nto", target_os = "openbsd", @@ -282,6 +293,7 @@ macro_rules! syscall { /// Maximum size of a buffer passed to system call like `recv` and `send`. #[cfg(not(any( target_os = "ios", + target_os = "visionos", target_os = "macos", target_os = "tvos", target_os = "watchos", @@ -298,6 +310,7 @@ const MAX_BUF_LEN: usize = ssize_t::MAX as usize; // both platforms. #[cfg(any( target_os = "ios", + target_os = "visionos", target_os = "macos", target_os = "tvos", target_os = "watchos", @@ -337,6 +350,7 @@ type IovLen = usize; target_os = "hurd", target_os = "illumos", target_os = "ios", + target_os = "visionos", target_os = "macos", target_os = "netbsd", target_os = "nto", @@ -1227,6 +1241,7 @@ pub(crate) fn set_tcp_keepalive(fd: Socket, keepalive: &TcpKeepalive) -> io::Res target_os = "hurd", target_os = "illumos", target_os = "ios", + target_os = "visionos", target_os = "linux", target_os = "macos", target_os = "netbsd", @@ -1455,6 +1470,7 @@ impl crate::Socket { #[cfg_attr( any( target_os = "ios", + target_os = "visionos", target_os = "macos", target_os = "tvos", target_os = "watchos" @@ -1491,6 +1507,7 @@ impl crate::Socket { feature = "all", any( target_os = "ios", + target_os = "visionos", target_os = "macos", target_os = "tvos", target_os = "watchos", @@ -1502,6 +1519,7 @@ impl crate::Socket { feature = "all", any( target_os = "ios", + target_os = "visionos", target_os = "macos", target_os = "tvos", target_os = "watchos", @@ -1514,6 +1532,7 @@ impl crate::Socket { #[cfg(any( target_os = "ios", + target_os = "visionos", target_os = "macos", target_os = "tvos", target_os = "watchos", @@ -1950,6 +1969,7 @@ impl crate::Socket { feature = "all", any( target_os = "ios", + target_os = "visionos", target_os = "macos", target_os = "tvos", target_os = "watchos", @@ -1961,6 +1981,7 @@ impl crate::Socket { feature = "all", any( target_os = "ios", + target_os = "visionos", target_os = "macos", target_os = "tvos", target_os = "watchos", @@ -1986,6 +2007,7 @@ impl crate::Socket { feature = "all", any( target_os = "ios", + target_os = "visionos", target_os = "macos", target_os = "tvos", target_os = "watchos", @@ -1997,6 +2019,7 @@ impl crate::Socket { feature = "all", any( target_os = "ios", + target_os = "visionos", target_os = "macos", target_os = "tvos", target_os = "watchos", @@ -2022,6 +2045,7 @@ impl crate::Socket { feature = "all", any( target_os = "ios", + target_os = "visionos", target_os = "macos", target_os = "tvos", target_os = "watchos", @@ -2033,6 +2057,7 @@ impl crate::Socket { feature = "all", any( target_os = "ios", + target_os = "visionos", target_os = "macos", target_os = "tvos", target_os = "watchos", @@ -2053,6 +2078,7 @@ impl crate::Socket { feature = "all", any( target_os = "ios", + target_os = "visionos", target_os = "macos", target_os = "tvos", target_os = "watchos", @@ -2064,6 +2090,7 @@ impl crate::Socket { feature = "all", any( target_os = "ios", + target_os = "visionos", target_os = "macos", target_os = "tvos", target_os = "watchos", @@ -2081,6 +2108,7 @@ impl crate::Socket { feature = "all", any( target_os = "ios", + target_os = "visionos", target_os = "macos", target_os = "tvos", target_os = "watchos", @@ -2092,6 +2120,7 @@ impl crate::Socket { feature = "all", any( target_os = "ios", + target_os = "visionos", target_os = "macos", target_os = "tvos", target_os = "watchos", @@ -2112,6 +2141,7 @@ impl crate::Socket { feature = "all", any( target_os = "ios", + target_os = "visionos", target_os = "macos", target_os = "tvos", target_os = "watchos", @@ -2123,6 +2153,7 @@ impl crate::Socket { feature = "all", any( target_os = "ios", + target_os = "visionos", target_os = "macos", target_os = "tvos", target_os = "watchos", @@ -2446,6 +2477,7 @@ impl crate::Socket { target_os = "android", target_os = "freebsd", target_os = "ios", + target_os = "visionos", target_os = "linux", target_os = "macos", target_os = "tvos", @@ -2461,6 +2493,7 @@ impl crate::Socket { target_os = "android", target_os = "freebsd", target_os = "ios", + target_os = "visionos", target_os = "linux", target_os = "macos", target_os = "tvos", @@ -2484,6 +2517,7 @@ impl crate::Socket { feature = "all", any( target_os = "ios", + target_os = "visionos", target_os = "macos", target_os = "tvos", target_os = "watchos", diff --git a/tests/socket.rs b/tests/socket.rs index 1c83321a..f2abe09c 100644 --- a/tests/socket.rs +++ b/tests/socket.rs @@ -5,6 +5,7 @@ target_os = "android", target_os = "freebsd", target_os = "ios", + target_os = "visionos", target_os = "linux", target_os = "macos", target_os = "tvos", @@ -29,6 +30,7 @@ use std::net::{Ipv6Addr, SocketAddrV6}; target_os = "android", target_os = "freebsd", target_os = "ios", + target_os = "visionos", target_os = "linux", target_os = "macos", target_os = "tvos", @@ -225,6 +227,7 @@ fn assert_common_flags(socket: &Socket, expected: bool) { assert_close_on_exec(socket, expected); #[cfg(any( target_os = "ios", + target_os = "visionos", target_os = "macos", target_os = "tvos", target_os = "watchos", @@ -416,6 +419,7 @@ where feature = "all", any( target_os = "ios", + target_os = "visionos", target_os = "macos", target_os = "tvos", target_os = "watchos", @@ -436,6 +440,7 @@ fn set_nosigpipe() { /// Assert that `SO_NOSIGPIPE` is set on `socket`. #[cfg(any( target_os = "ios", + target_os = "visionos", target_os = "macos", target_os = "tvos", target_os = "watchos", @@ -864,6 +869,7 @@ fn tcp_keepalive() { target_os = "freebsd", target_os = "fuchsia", target_os = "ios", + target_os = "visionos", target_os = "linux", target_os = "macos", target_os = "netbsd", @@ -881,6 +887,7 @@ fn tcp_keepalive() { target_os = "freebsd", target_os = "fuchsia", target_os = "ios", + target_os = "visionos", target_os = "linux", target_os = "macos", target_os = "netbsd", @@ -908,6 +915,7 @@ fn tcp_keepalive() { target_os = "fuchsia", target_os = "illumos", target_os = "ios", + target_os = "visionos", target_os = "linux", target_os = "macos", target_os = "netbsd", @@ -929,6 +937,7 @@ fn tcp_keepalive() { target_os = "fuchsia", target_os = "illumos", target_os = "ios", + target_os = "visionos", target_os = "linux", target_os = "macos", target_os = "netbsd", @@ -977,6 +986,7 @@ fn device() { feature = "all", any( target_os = "ios", + target_os = "visionos", target_os = "macos", target_os = "tvos", target_os = "watchos", @@ -1022,6 +1032,7 @@ fn device() { feature = "all", any( target_os = "ios", + target_os = "visionos", target_os = "macos", target_os = "tvos", target_os = "watchos", @@ -1069,6 +1080,7 @@ fn device_v6() { target_os = "android", target_os = "freebsd", target_os = "ios", + target_os = "visionos", target_os = "linux", target_os = "macos", target_os = "tvos", @@ -1226,6 +1238,7 @@ fn r#type() { unix, not(any( target_os = "ios", + target_os = "visionos", target_os = "macos", target_os = "tvos", target_os = "watchos",