Skip to content

Commit

Permalink
Enable IPv4PacketInfo and Ipv6PacketInfo on more OSes.
Browse files Browse the repository at this point in the history
This was an oversight from PR nix-rust#1002
  • Loading branch information
asomers committed Feb 12, 2019
1 parent a5c7047 commit f11fe7f
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/sys/socket/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit f11fe7f

Please sign in to comment.