Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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")),
)
))]
Expand Down
16 changes: 13 additions & 3 deletions src/socket.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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"))))]
Expand Down Expand Up @@ -1214,6 +1214,7 @@ impl Socket {
not(any(
target_os = "redox",
target_os = "espidf",
target_os = "nuttx",
target_os = "wasi",
target_os = "horizon"
))
Expand Down Expand Up @@ -1245,6 +1246,7 @@ impl Socket {
not(any(
target_os = "redox",
target_os = "espidf",
target_os = "nuttx",
target_os = "wasi",
target_os = "horizon"
))
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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),
Expand All @@ -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),
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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")),
)
))]
Expand Down Expand Up @@ -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")),
)
))]
Expand Down
11 changes: 10 additions & 1 deletion src/sys/unix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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"
Expand All @@ -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"
))
Expand All @@ -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",
Expand Down Expand Up @@ -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};
Expand Down Expand Up @@ -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")),
)
))]
Expand Down Expand Up @@ -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",
))]
Expand Down Expand Up @@ -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")),
))]
{
Expand Down Expand Up @@ -2210,6 +2217,7 @@ impl crate::Socket {
target_os = "solaris",
target_os = "illumos",
target_os = "cygwin",
target_os = "nuttx",
target_os = "wasi"
))
))]
Expand All @@ -2231,6 +2239,7 @@ impl crate::Socket {
target_os = "solaris",
target_os = "illumos",
target_os = "cygwin",
target_os = "nuttx",
target_os = "wasi"
))
))]
Expand Down
Loading