diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/sys/mod.rs | 2 | ||||
-rw-r--r-- | src/sys/socket/sockopt.rs | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/sys/mod.rs b/src/sys/mod.rs index 5d9821a7..a87de55b 100644 --- a/src/sys/mod.rs +++ b/src/sys/mod.rs @@ -126,6 +126,6 @@ pub mod wait; #[allow(missing_docs)] pub mod inotify; -#[cfg(target_os = "linux")] +#[cfg(any(target_os = "android", target_os = "linux"))] #[allow(missing_docs)] pub mod timerfd; diff --git a/src/sys/socket/sockopt.rs b/src/sys/socket/sockopt.rs index 17dd7568..00154fec 100644 --- a/src/sys/socket/sockopt.rs +++ b/src/sys/socket/sockopt.rs @@ -356,6 +356,10 @@ sockopt_impl!(Both, Ipv6V6Only, libc::IPPROTO_IPV6, libc::IPV6_V6ONLY, bool); sockopt_impl!(Both, Ipv4RecvErr, libc::IPPROTO_IP, libc::IP_RECVERR, bool); #[cfg(any(target_os = "android", target_os = "linux"))] sockopt_impl!(Both, Ipv6RecvErr, libc::IPPROTO_IPV6, libc::IPV6_RECVERR, bool); +#[cfg(any(target_os = "android", target_os = "freebsd", target_os = "linux"))] +sockopt_impl!(Both, Ipv4Ttl, libc::IPPROTO_IP, libc::IP_TTL, libc::c_int); +#[cfg(any(target_os = "android", target_os = "freebsd", target_os = "linux"))] +sockopt_impl!(Both, Ipv6Ttl, libc::IPPROTO_IPV6, libc::IPV6_UNICAST_HOPS, libc::c_int); #[cfg(any(target_os = "android", target_os = "linux"))] #[derive(Copy, Clone, Debug)] |