summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2021-10-21 23:43:37 +0000
committerbors <bors@rust-lang.org>2021-10-21 23:43:37 +0000
commit77636bb798f69a7b3f2724040046e1f8268a5e9e (patch)
treeeef74741524189c85b5224f9f6b0e28c2cda9206
parent473e8deb372dee29730c321f82ebba69d579cdbe (diff)
parent2c65744eaebb36f02a096e3bea8f175579fb1b5e (diff)
downloadrust-libc-77636bb798f69a7b3f2724040046e1f8268a5e9e.tar.gz
Auto merge of #2453 - tklauser:linux-netlink-consts, r=JohnTitor
Add NETLINK_EXT_ACK and NETLINK_GET_STRICT_CHK on Linux
-rw-r--r--libc-test/build.rs3
-rw-r--r--libc-test/semver/linux.txt2
-rw-r--r--src/unix/linux_like/linux/mod.rs2
3 files changed, 7 insertions, 0 deletions
diff --git a/libc-test/build.rs b/libc-test/build.rs
index 32f48119e8..eb92b2c4ce 100644
--- a/libc-test/build.rs
+++ b/libc-test/build.rs
@@ -2928,6 +2928,9 @@ fn test_linux(target: &str) {
| "CLOSE_RANGE_UNSHARE"
| "CLOSE_RANGE_CLOEXEC" => true,
+ // FIXME: Not currently available in headers on ARM, MIPS and musl.
+ "NETLINK_GET_STRICT_CHK" if arm || mips || musl => true,
+
// kernel constants not available in uclibc 1.0.34
| "ADDR_COMPAT_LAYOUT"
| "ADDR_LIMIT_3GB"
diff --git a/libc-test/semver/linux.txt b/libc-test/semver/linux.txt
index 15248960ec..5e3ed324d1 100644
--- a/libc-test/semver/linux.txt
+++ b/libc-test/semver/linux.txt
@@ -1200,9 +1200,11 @@ NETLINK_CRYPTO
NETLINK_DNRTMSG
NETLINK_DROP_MEMBERSHIP
NETLINK_ECRYPTFS
+NETLINK_EXT_ACK
NETLINK_FIB_LOOKUP
NETLINK_FIREWALL
NETLINK_GENERIC
+NETLINK_GET_STRICT_CHK
NETLINK_INET_DIAG
NETLINK_IP6_FW
NETLINK_ISCSI
diff --git a/src/unix/linux_like/linux/mod.rs b/src/unix/linux_like/linux/mod.rs
index 460ea6248b..22bdab8b44 100644
--- a/src/unix/linux_like/linux/mod.rs
+++ b/src/unix/linux_like/linux/mod.rs
@@ -2394,6 +2394,8 @@ pub const NETLINK_TX_RING: ::c_int = 7;
pub const NETLINK_LISTEN_ALL_NSID: ::c_int = 8;
pub const NETLINK_LIST_MEMBERSHIPS: ::c_int = 9;
pub const NETLINK_CAP_ACK: ::c_int = 10;
+pub const NETLINK_EXT_ACK: ::c_int = 11;
+pub const NETLINK_GET_STRICT_CHK: ::c_int = 12;
pub const NLA_F_NESTED: ::c_int = 1 << 15;
pub const NLA_F_NET_BYTEORDER: ::c_int = 1 << 14;