Skip to content

Commit

Permalink
Auto merge of #2556 - GuillaumeGomez:net-if, r=Amanieu
Browse files Browse the repository at this point in the history
Add missing net/if.h and net/if_mib.h items
  • Loading branch information
bors committed Nov 23, 2021
2 parents 82b85b7 + bab20a8 commit dd76900
Show file tree
Hide file tree
Showing 2 changed files with 934 additions and 24 deletions.
18 changes: 18 additions & 0 deletions libc-test/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1810,6 +1810,7 @@ fn test_freebsd(target: &str) {
"net/if.h",
"net/if_arp.h",
"net/if_dl.h",
"net/if_mib.h",
"net/route.h",
"netdb.h",
"netinet/ip.h",
Expand Down Expand Up @@ -2093,6 +2094,18 @@ fn test_freebsd(target: &str) {
true
}

// Added in freebsd 14.
"IFCAP_MEXTPG" if Some(14) > freebsd_ver => true,
// Added in freebsd 13.
"IFF_KNOWSEPOCH" | "IFCAP_TXTLS4" | "IFCAP_TXTLS6" | "IFCAP_VXLAN_HWCSUM"
| "IFCAP_VXLAN_HWTSO" | "IFCAP_TXTLS_RTLMT" | "IFCAP_TXTLS"
if Some(13) > freebsd_ver =>
{
true
}
// Added in freebsd 12.
"IFF_NOGROUP" | "IFCAP_TXRTLMT" | "IFCAP_HWRXTSTMP" if Some(12) > freebsd_ver => true,

_ => false,
}
});
Expand Down Expand Up @@ -2207,6 +2220,11 @@ fn test_freebsd(target: &str) {
("Elf32_Auxinfo", "a_un") => true,
("Elf64_Auxinfo", "a_un") => true,

// union fields
("if_data", "__ifi_epoch") => true,
("if_data", "__ifi_lastchange") => true,
("ifreq", "ifr_ifru") => true,

// FIXME: structs too complicated to bind for now...
("kinfo_proc", "ki_paddr") => true,
("kinfo_proc", "ki_addr") => true,
Expand Down
Loading

0 comments on commit dd76900

Please sign in to comment.