diff --git a/src/lib.rs b/src/lib.rs index 30eedd62..e12aab06 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -449,7 +449,7 @@ pub struct TcpKeepalive { target_os = "openbsd", target_os = "redox", target_os = "solaris", - target_os = "nto", + all(target_os = "nto", not(target_env = "nto71_iosock")), target_os = "espidf", target_os = "vita", target_os = "haiku", @@ -460,7 +460,7 @@ pub struct TcpKeepalive { target_os = "openbsd", target_os = "redox", target_os = "solaris", - target_os = "nto", + all(target_os = "nto", not(target_env = "nto71_iosock")), target_os = "espidf", target_os = "vita", target_os = "haiku", @@ -479,7 +479,7 @@ impl TcpKeepalive { target_os = "openbsd", target_os = "redox", target_os = "solaris", - target_os = "nto", + all(target_os = "nto", not(target_env = "nto71_iosock")), target_os = "espidf", target_os = "vita", target_os = "haiku", @@ -490,7 +490,7 @@ impl TcpKeepalive { target_os = "openbsd", target_os = "redox", target_os = "solaris", - target_os = "nto", + all(target_os = "nto", not(target_env = "nto71_iosock")), target_os = "espidf", target_os = "vita", target_os = "haiku", diff --git a/src/sockaddr.rs b/src/sockaddr.rs index 120a5466..1e1dc218 100644 --- a/src/sockaddr.rs +++ b/src/sockaddr.rs @@ -370,7 +370,7 @@ impl From for SockAddr { target_os = "visionos", target_os = "macos", target_os = "netbsd", - target_os = "nto", + all(target_os = "nto", not(target_env = "nto71_iosock")), target_os = "openbsd", target_os = "tvos", target_os = "vxworks", @@ -414,7 +414,7 @@ impl From for SockAddr { target_os = "visionos", target_os = "macos", target_os = "netbsd", - target_os = "nto", + all(target_os = "nto", not(target_env = "nto71_iosock")), target_os = "openbsd", target_os = "tvos", target_os = "vxworks", @@ -439,7 +439,7 @@ impl fmt::Debug for SockAddr { target_os = "visionos", target_os = "macos", target_os = "netbsd", - target_os = "nto", + all(target_os = "nto", not(target_env = "nto71_iosock")), target_os = "openbsd", target_os = "tvos", target_os = "vxworks", diff --git a/src/socket.rs b/src/socket.rs index da01a77a..4020eba9 100644 --- a/src/socket.rs +++ b/src/socket.rs @@ -11,7 +11,10 @@ use std::io::{self, Read, Write}; #[cfg(not(any(target_os = "redox", target_os = "wasi", target_os = "horizon")))] use std::io::{IoSlice, IoSliceMut}; use std::mem::MaybeUninit; -#[cfg(not(any(target_os = "nto", target_os = "nuttx")))] +#[cfg(not(any( + all(target_os = "nto", not(target_env = "nto71_iosock")), + target_os = "nuttx" +)))] use std::net::Ipv6Addr; use std::net::{self, Ipv4Addr, Shutdown}; #[cfg(any(unix, all(target_os = "wasi", not(target_env = "p1"))))] @@ -1351,7 +1354,7 @@ impl Socket { target_os = "openbsd", target_os = "redox", target_os = "solaris", - target_os = "nto", + all(target_os = "nto", not(target_env = "nto71_iosock")), target_os = "espidf", target_os = "vita", target_os = "cygwin", @@ -1387,7 +1390,7 @@ impl Socket { target_os = "openbsd", target_os = "redox", target_os = "solaris", - target_os = "nto", + all(target_os = "nto", not(target_env = "nto71_iosock")), target_os = "espidf", target_os = "vita", target_os = "cygwin", @@ -1425,7 +1428,7 @@ impl Socket { target_os = "openbsd", target_os = "redox", target_os = "fuchsia", - target_os = "nto", + all(target_os = "nto", not(target_env = "nto71_iosock")), target_os = "espidf", target_os = "vita", target_os = "wasi", @@ -1465,7 +1468,7 @@ impl Socket { target_os = "openbsd", target_os = "redox", target_os = "fuchsia", - target_os = "nto", + all(target_os = "nto", not(target_env = "nto71_iosock")), target_os = "espidf", target_os = "vita", target_os = "wasi", @@ -1686,7 +1689,7 @@ impl Socket { target_os = "redox", target_os = "solaris", target_os = "haiku", - target_os = "nto", + all(target_os = "nto", not(target_env = "nto71_iosock")), target_os = "espidf", target_os = "nuttx", target_os = "vita", @@ -1721,7 +1724,7 @@ impl Socket { target_os = "redox", target_os = "solaris", target_os = "haiku", - target_os = "nto", + all(target_os = "nto", not(target_env = "nto71_iosock")), target_os = "espidf", target_os = "nuttx", target_os = "vita", @@ -1870,7 +1873,10 @@ impl Socket { /// This function specifies a new multicast group for this socket to join. /// The address must be a valid multicast address, and `interface` is the /// index of the interface to join/leave (or 0 to indicate any interface). - #[cfg(not(any(target_os = "nto", target_os = "nuttx")))] + #[cfg(not(any( + all(target_os = "nto", not(target_env = "nto71_iosock")), + target_os = "nuttx" + )))] pub fn join_multicast_v6(&self, multiaddr: &Ipv6Addr, interface: u32) -> io::Result<()> { let mreq = sys::Ipv6Mreq { ipv6mr_multiaddr: sys::to_in6_addr(multiaddr), @@ -1894,7 +1900,10 @@ impl Socket { /// For more information about this option, see [`join_multicast_v6`]. /// /// [`join_multicast_v6`]: Socket::join_multicast_v6 - #[cfg(not(any(target_os = "nto", target_os = "nuttx")))] + #[cfg(not(any( + all(target_os = "nto", not(target_env = "nto71_iosock")), + target_os = "nuttx" + )))] pub fn leave_multicast_v6(&self, multiaddr: &Ipv6Addr, interface: u32) -> io::Result<()> { let mreq = sys::Ipv6Mreq { ipv6mr_multiaddr: sys::to_in6_addr(multiaddr), diff --git a/src/sys/unix.rs b/src/sys/unix.rs index 65e494bc..ed487394 100644 --- a/src/sys/unix.rs +++ b/src/sys/unix.rs @@ -135,7 +135,10 @@ pub(crate) use libc::MSG_TRUNC; #[cfg(not(any(target_os = "redox", target_os = "wasi")))] pub(crate) use libc::SO_OOBINLINE; // Used in `Socket`. -#[cfg(not(any(target_os = "nto", target_os = "nuttx")))] +#[cfg(not(any( + all(target_os = "nto", not(target_env = "nto71_iosock")), + target_os = "nuttx" +)))] pub(crate) use libc::ipv6_mreq as Ipv6Mreq; #[cfg(all(feature = "all", target_os = "linux"))] pub(crate) use libc::IPV6_HDRINCL; @@ -198,7 +201,7 @@ pub(crate) use libc::IP_HDRINCL; target_os = "solaris", target_os = "haiku", target_os = "hurd", - target_os = "nto", + all(target_os = "nto", not(target_env = "nto71_iosock")), target_os = "espidf", target_os = "nuttx", target_os = "vita", @@ -252,7 +255,7 @@ pub(crate) use libc::{ target_os = "openbsd", target_os = "redox", target_os = "fuchsia", - target_os = "nto", + all(target_os = "nto", not(target_env = "nto71_iosock")), target_os = "espidf", target_os = "vita", target_os = "wasi", @@ -270,7 +273,8 @@ pub(crate) use libc::{ target_os = "visionos", target_os = "macos", target_os = "netbsd", - target_os = "nto", + all(target_os = "nto", target_env = "nto71_iosock"), + target_os = "qnx", target_os = "openbsd", target_os = "solaris", target_os = "tvos", @@ -289,6 +293,8 @@ pub(crate) use libc::{IPV6_ADD_MEMBERSHIP, IPV6_DROP_MEMBERSHIP}; target_os = "macos", target_os = "netbsd", target_os = "openbsd", + all(target_os = "nto", target_env = "nto71_iosock"), + target_os = "qnx", target_os = "solaris", target_os = "tvos", target_os = "watchos", @@ -427,6 +433,7 @@ type IovLen = usize; target_os = "macos", target_os = "netbsd", target_os = "nto", + target_os = "qnx", target_os = "openbsd", target_os = "solaris", target_os = "tvos", @@ -1277,7 +1284,7 @@ pub(crate) fn set_tcp_keepalive(fd: RawSocket, keepalive: &TcpKeepalive) -> io:: #[cfg(not(any( target_os = "haiku", target_os = "openbsd", - target_os = "nto", + all(target_os = "nto", not(target_env = "nto71_iosock")), target_os = "vita" )))] if let Some(time) = keepalive.time { @@ -1297,6 +1304,8 @@ pub(crate) fn set_tcp_keepalive(fd: RawSocket, keepalive: &TcpKeepalive) -> io:: target_os = "ios", target_os = "visionos", target_os = "linux", + all(target_os = "nto", target_env = "nto71_iosock"), + target_os = "qnx", target_os = "macos", target_os = "netbsd", target_os = "tvos", @@ -1316,7 +1325,7 @@ pub(crate) fn set_tcp_keepalive(fd: RawSocket, keepalive: &TcpKeepalive) -> io:: } } - #[cfg(target_os = "nto")] + #[cfg(all(target_os = "nto", not(target_env = "nto71_iosock")))] if let Some(time) = keepalive.time { let secs = into_timeval(Some(time)); unsafe { setsockopt(fd, libc::IPPROTO_TCP, KEEPALIVE_TIME, secs)? } @@ -1328,7 +1337,7 @@ pub(crate) fn set_tcp_keepalive(fd: RawSocket, keepalive: &TcpKeepalive) -> io:: #[cfg(not(any( target_os = "haiku", target_os = "openbsd", - target_os = "nto", + all(target_os = "nto", not(target_env = "nto71_iosock")), target_os = "vita" )))] fn into_secs(duration: Duration) -> c_int { @@ -1434,7 +1443,7 @@ pub(crate) fn from_in6_addr(addr: in6_addr) -> Ipv6Addr { target_os = "openbsd", target_os = "redox", target_os = "solaris", - target_os = "nto", + all(target_os = "nto", not(target_env = "nto71_iosock")), target_os = "espidf", target_os = "vita", target_os = "cygwin",