diff --git a/src/socket.rs b/src/socket.rs index 32c8dd9d..1cc24189 100644 --- a/src/socket.rs +++ b/src/socket.rs @@ -2024,20 +2024,23 @@ impl Socket { /// The received hop limit is returned as ancillary data by recvmsg() /// only if the application has enabled the IPV6_RECVHOPLIMIT socket /// option: - #[cfg(not(any( - windows, - target_os = "dragonfly", - target_os = "fuchsia", - target_os = "illumos", - target_os = "netbsd", - target_os = "openbsd", - target_os = "redox", - target_os = "solaris", - target_os = "haiku", - target_os = "hurd", - target_os = "espidf", - target_os = "vita", - )))] + #[cfg(all( + feature = "all", + not(any( + windows, + target_os = "dragonfly", + target_os = "fuchsia", + target_os = "illumos", + target_os = "netbsd", + target_os = "openbsd", + target_os = "redox", + target_os = "solaris", + target_os = "haiku", + target_os = "hurd", + target_os = "espidf", + target_os = "vita", + )) + ))] pub fn set_recv_hoplimit_v6(&self, recv_hoplimit: bool) -> io::Result<()> { unsafe { setsockopt( diff --git a/src/sys/unix.rs b/src/sys/unix.rs index 237cbeb3..690108ef 100644 --- a/src/sys/unix.rs +++ b/src/sys/unix.rs @@ -122,34 +122,6 @@ pub(crate) use libc::SO_OOBINLINE; // Used in `Socket`. #[cfg(not(target_os = "nto"))] pub(crate) use libc::ipv6_mreq as Ipv6Mreq; -#[cfg(not(any( - target_os = "dragonfly", - target_os = "fuchsia", - target_os = "hurd", - target_os = "illumos", - target_os = "netbsd", - target_os = "openbsd", - target_os = "redox", - target_os = "solaris", - target_os = "haiku", - target_os = "espidf", - target_os = "vita", -)))] -pub(crate) use libc::IPV6_RECVHOPLIMIT; -#[cfg(not(any( - target_os = "dragonfly", - target_os = "fuchsia", - target_os = "hurd", - target_os = "illumos", - target_os = "netbsd", - target_os = "openbsd", - target_os = "redox", - target_os = "solaris", - target_os = "haiku", - target_os = "espidf", - target_os = "vita", -)))] -pub(crate) use libc::IPV6_RECVTCLASS; #[cfg(all(feature = "all", not(any(target_os = "redox", target_os = "espidf"))))] pub(crate) use libc::IP_HDRINCL; #[cfg(not(any( @@ -249,6 +221,20 @@ pub(crate) use libc::{IPV6_ADD_MEMBERSHIP, IPV6_DROP_MEMBERSHIP}; pub(crate) use libc::{ IPV6_JOIN_GROUP as IPV6_ADD_MEMBERSHIP, IPV6_LEAVE_GROUP as IPV6_DROP_MEMBERSHIP, }; +#[cfg(not(any( + target_os = "dragonfly", + target_os = "fuchsia", + target_os = "hurd", + target_os = "illumos", + target_os = "netbsd", + target_os = "openbsd", + target_os = "redox", + target_os = "solaris", + target_os = "haiku", + target_os = "espidf", + target_os = "vita", +)))] +pub(crate) use libc::{IPV6_RECVHOPLIMIT, IPV6_RECVTCLASS}; #[cfg(all( feature = "all", any(