summaryrefslogtreecommitdiff
path: root/src/sys/socket
diff options
context:
space:
mode:
authorAlan Somers <asomers@gmail.com>2019-01-31 08:29:54 -0700
committerAlan Somers <asomers@gmail.com>2019-02-14 10:15:51 -0700
commitb5c4c7a9c043afc97ced704c1edd482e12903234 (patch)
tree6c8cea3595d7f4be9aeaa90e980f692c99d4a21c /src/sys/socket
parent2966dcd52098a2f20e0bb8e7e6f9655fbd00d792 (diff)
downloadnix-b5c4c7a9c043afc97ced704c1edd482e12903234.zip
Enable IPv4PacketInfo and Ipv6PacketInfo on more OSes.
This was an oversight from PR #1002
Diffstat (limited to 'src/sys/socket')
-rw-r--r--src/sys/socket/mod.rs11
1 files changed, 8 insertions, 3 deletions
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);