From f11fe7f41e23250d986595f02ab8039644f2c7c3 Mon Sep 17 00:00:00 2001 From: Alan Somers Date: Thu, 31 Jan 2019 08:29:54 -0700 Subject: [PATCH] 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(-) diff --git a/src/sys/socket/mod.rs b/src/sys/socket/mod.rs index 771ce8bfcb..8000991773 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);