From b5c4c7a9c043afc97ced704c1edd482e12903234 Mon Sep 17 00:00:00 2001 From: Alan Somers Date: Thu, 31 Jan 2019 08:29:54 -0700 Subject: Enable IPv4PacketInfo and Ipv6PacketInfo on more OSes. This was an oversight from PR #1002 --- src/sys/socket/mod.rs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src/sys') diff --git a/src/sys/socket/mod.rs b/src/sys/socket/mod.rs index 771ce8bf..80009917 100644 --- a/src/sys/socket/mod.rs +++ b/src/sys/socket/mod.rs @@ -543,15 +543,19 @@ pub enum ControlMessageOwned { target_os = "android", target_os = "ios", target_os = "linux", - target_os = "macos" + target_os = "macos", + target_os = "netbsd", ))] Ipv4PacketInfo(libc::in_pktinfo), #[cfg(any( target_os = "android", + target_os = "dragonfly", target_os = "freebsd", target_os = "ios", target_os = "linux", - target_os = "macos" + target_os = "macos", + target_os = "openbsd", + target_os = "netbsd", ))] Ipv6PacketInfo(libc::in6_pktinfo), #[cfg(any( @@ -625,7 +629,8 @@ impl ControlMessageOwned { target_os = "android", target_os = "ios", target_os = "linux", - target_os = "macos" + target_os = "macos", + target_os = "netbsd", ))] (libc::IPPROTO_IP, libc::IP_PKTINFO) => { let info = ptr::read_unaligned(p as *const libc::in_pktinfo); -- cgit v1.2.3