Skip to content

Commit b5c4c7a

Browse files
committed
Enable IPv4PacketInfo and Ipv6PacketInfo on more OSes.
This was an oversight from PR #1002
1 parent 2966dcd commit b5c4c7a

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/sys/socket/mod.rs

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -543,15 +543,19 @@ pub enum ControlMessageOwned {
543543
target_os = "android",
544544
target_os = "ios",
545545
target_os = "linux",
546-
target_os = "macos"
546+
target_os = "macos",
547+
target_os = "netbsd",
547548
))]
548549
Ipv4PacketInfo(libc::in_pktinfo),
549550
#[cfg(any(
550551
target_os = "android",
552+
target_os = "dragonfly",
551553
target_os = "freebsd",
552554
target_os = "ios",
553555
target_os = "linux",
554-
target_os = "macos"
556+
target_os = "macos",
557+
target_os = "openbsd",
558+
target_os = "netbsd",
555559
))]
556560
Ipv6PacketInfo(libc::in6_pktinfo),
557561
#[cfg(any(
@@ -625,7 +629,8 @@ impl ControlMessageOwned {
625629
target_os = "android",
626630
target_os = "ios",
627631
target_os = "linux",
628-
target_os = "macos"
632+
target_os = "macos",
633+
target_os = "netbsd",
629634
))]
630635
(libc::IPPROTO_IP, libc::IP_PKTINFO) => {
631636
let info = ptr::read_unaligned(p as *const libc::in_pktinfo);

0 commit comments

Comments
 (0)