Skip to content

Commit 18b0102

Browse files
committed
Auto merge of #1188 - pusateri:netbsd8, r=gnzlbg
NetBSD 8 adds new address family changing AF_MAX and new ifaddrs flags. libc-test on NetBSD 8.0 fails without these changes. ifa_addrflags was added to struct ifaddrs to support AF_CAN. AF_MAX got bumped up one by AF_CAN. RT_IFLIST format changed to support ifa_addrflags.
2 parents ce1dfcb + 0f712b3 commit 18b0102

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

src/unix/bsd/mod.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,9 @@ s! {
5757
pub ifa_addr: *mut ::sockaddr,
5858
pub ifa_netmask: *mut ::sockaddr,
5959
pub ifa_dstaddr: *mut ::sockaddr,
60-
pub ifa_data: *mut ::c_void
60+
pub ifa_data: *mut ::c_void,
61+
#[cfg(target_os = "netbsd")]
62+
pub ifa_addrflags: ::c_uint
6163
}
6264

6365
pub struct fd_set {

src/unix/bsd/netbsdlike/netbsd/mod.rs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -526,15 +526,16 @@ pub const AF_BLUETOOTH: ::c_int = 31;
526526
pub const AF_IEEE80211: ::c_int = 32;
527527
pub const AF_MPLS: ::c_int = 33;
528528
pub const AF_ROUTE: ::c_int = 34;
529-
pub const AF_MAX: ::c_int = 35;
529+
pub const AF_MAX: ::c_int = 36;
530530

531531
pub const NET_MAXID: ::c_int = AF_MAX;
532532
pub const NET_RT_DUMP: ::c_int = 1;
533533
pub const NET_RT_FLAGS: ::c_int = 2;
534-
pub const NET_RT_OOIFLIST: ::c_int = 3;
535-
pub const NET_RT_OIFLIST: ::c_int = 4;
536-
pub const NET_RT_IFLIST: ::c_int = 5;
537-
pub const NET_RT_MAXID: ::c_int = 6;
534+
pub const NET_RT_OOOIFLIST: ::c_int = 3;
535+
pub const NET_RT_OOIFLIST: ::c_int = 4;
536+
pub const NET_RT_OIFLIST: ::c_int = 5;
537+
pub const NET_RT_IFLIST: ::c_int = 6;
538+
pub const NET_RT_MAXID: ::c_int = 7;
538539

539540
pub const PF_OROUTE: ::c_int = AF_OROUTE;
540541
pub const PF_ARP: ::c_int = AF_ARP;

0 commit comments

Comments
 (0)