diff --git a/src/lib.rs b/src/lib.rs index 53f9c591..30eedd62 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -541,6 +541,7 @@ impl TcpKeepalive { target_os = "watchos", target_os = "windows", target_os = "cygwin", + target_os = "nuttx", all(target_os = "wasi", not(target_env = "p1")), ))] pub const fn with_interval(self, interval: Duration) -> Self { @@ -572,6 +573,7 @@ impl TcpKeepalive { target_os = "watchos", target_os = "cygwin", target_os = "windows", + target_os = "nuttx", all(target_os = "wasi", not(target_env = "p1")), ) ))] diff --git a/src/socket.rs b/src/socket.rs index af493f70..da01a77a 100644 --- a/src/socket.rs +++ b/src/socket.rs @@ -11,7 +11,7 @@ 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(target_os = "nto"))] +#[cfg(not(any(target_os = "nto", target_os = "nuttx")))] use std::net::Ipv6Addr; use std::net::{self, Ipv4Addr, Shutdown}; #[cfg(any(unix, all(target_os = "wasi", not(target_env = "p1"))))] @@ -1214,6 +1214,7 @@ impl Socket { not(any( target_os = "redox", target_os = "espidf", + target_os = "nuttx", target_os = "wasi", target_os = "horizon" )) @@ -1245,6 +1246,7 @@ impl Socket { not(any( target_os = "redox", target_os = "espidf", + target_os = "nuttx", target_os = "wasi", target_os = "horizon" )) @@ -1686,6 +1688,7 @@ impl Socket { target_os = "haiku", target_os = "nto", target_os = "espidf", + target_os = "nuttx", target_os = "vita", target_os = "cygwin", target_os = "wasi", @@ -1720,6 +1723,7 @@ impl Socket { target_os = "haiku", target_os = "nto", target_os = "espidf", + target_os = "nuttx", target_os = "vita", target_os = "cygwin", target_os = "wasi", @@ -1763,6 +1767,7 @@ impl Socket { not(any( target_os = "redox", target_os = "espidf", + target_os = "nuttx", target_os = "openbsd", target_os = "freebsd", target_os = "dragonfly", @@ -1795,6 +1800,7 @@ impl Socket { not(any( target_os = "redox", target_os = "espidf", + target_os = "nuttx", target_os = "openbsd", target_os = "freebsd", target_os = "dragonfly", @@ -1864,7 +1870,7 @@ 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(target_os = "nto"))] + #[cfg(not(any(target_os = "nto", 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), @@ -1888,7 +1894,7 @@ impl Socket { /// For more information about this option, see [`join_multicast_v6`]. /// /// [`join_multicast_v6`]: Socket::join_multicast_v6 - #[cfg(not(target_os = "nto"))] + #[cfg(not(any(target_os = "nto", 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), @@ -2098,6 +2104,7 @@ impl Socket { target_os = "haiku", target_os = "hurd", target_os = "espidf", + target_os = "nuttx", target_os = "vita", target_os = "wasi", target_os = "horizon" @@ -2125,6 +2132,7 @@ impl Socket { target_os = "haiku", target_os = "hurd", target_os = "espidf", + target_os = "nuttx", target_os = "vita", target_os = "wasi", target_os = "horizon" @@ -2262,6 +2270,7 @@ impl Socket { target_os = "tvos", target_os = "watchos", target_os = "cygwin", + target_os = "nuttx", all(target_os = "wasi", not(target_env = "p1")), ) ))] @@ -2295,6 +2304,7 @@ impl Socket { target_os = "watchos", target_os = "cygwin", target_os = "windows", + target_os = "nuttx", all(target_os = "wasi", not(target_env = "p1")), ) ))] diff --git a/src/sys/unix.rs b/src/sys/unix.rs index da6adc8c..74e98ebd 100644 --- a/src/sys/unix.rs +++ b/src/sys/unix.rs @@ -135,7 +135,7 @@ 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(target_os = "nto"))] +#[cfg(not(any(target_os = "nto", target_os = "nuttx")))] pub(crate) use libc::ipv6_mreq as Ipv6Mreq; #[cfg(all(feature = "all", target_os = "linux"))] pub(crate) use libc::IPV6_HDRINCL; @@ -170,6 +170,7 @@ pub(crate) use libc::IPV6_RECVHOPLIMIT; target_os = "solaris", target_os = "haiku", target_os = "espidf", + target_os = "nuttx", target_os = "vita", target_os = "wasi", target_os = "horizon" @@ -180,6 +181,7 @@ pub(crate) use libc::IPV6_RECVTCLASS; not(any( target_os = "redox", target_os = "espidf", + target_os = "nuttx", target_os = "wasi", target_os = "horizon" )) @@ -198,6 +200,7 @@ pub(crate) use libc::IP_HDRINCL; target_os = "hurd", target_os = "nto", target_os = "espidf", + target_os = "nuttx", target_os = "vita", target_os = "wasi", target_os = "cygwin", @@ -272,6 +275,7 @@ pub(crate) use libc::{ target_os = "solaris", target_os = "tvos", target_os = "watchos", + target_os = "nuttx", target_os = "wasi", )))] pub(crate) use libc::{IPV6_ADD_MEMBERSHIP, IPV6_DROP_MEMBERSHIP}; @@ -312,6 +316,7 @@ pub(crate) use libc::{IPV6_MULTICAST_HOPS, IPV6_MULTICAST_IF, IP_MULTICAST_IF, M target_os = "tvos", target_os = "watchos", target_os = "cygwin", + target_os = "nuttx", all(target_os = "wasi", not(target_env = "p1")), ) ))] @@ -427,6 +432,7 @@ type IovLen = usize; target_os = "tvos", target_os = "watchos", target_os = "espidf", + target_os = "nuttx", target_os = "vita", target_os = "cygwin", ))] @@ -1295,6 +1301,7 @@ pub(crate) fn set_tcp_keepalive(fd: RawSocket, keepalive: &TcpKeepalive) -> io:: target_os = "tvos", target_os = "watchos", target_os = "cygwin", + target_os = "nuttx", all(target_os = "wasi", not(target_env = "p1")), ))] { @@ -2210,6 +2217,7 @@ impl crate::Socket { target_os = "solaris", target_os = "illumos", target_os = "cygwin", + target_os = "nuttx", target_os = "wasi" )) ))] @@ -2231,6 +2239,7 @@ impl crate::Socket { target_os = "solaris", target_os = "illumos", target_os = "cygwin", + target_os = "nuttx", target_os = "wasi" )) ))]