summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2018-12-04 17:36:48 +0100
committerTobias Klauser <tklauser@distanz.ch>2018-12-04 21:04:13 +0100
commitcc22997fd215c4b7c34ac69978bcaffbe2adc5f5 (patch)
treeba86ff820eecaf9c0dc60134e1ae4765cc571cfb
parent89faefe20bbe734b77be05eb43b8ae1b7776d26f (diff)
downloadrust-libc-cc22997fd215c4b7c34ac69978bcaffbe2adc5f5.tar.gz
Add AF_XDP, PF_XDP and SOL_XDP consts for linux
-rw-r--r--libc-test/build.rs3
-rw-r--r--src/unix/notbsd/linux/mod.rs2
-rw-r--r--src/unix/notbsd/linux/other/mod.rs1
3 files changed, 6 insertions, 0 deletions
diff --git a/libc-test/build.rs b/libc-test/build.rs
index 2d6327c448..7e0928fe00 100644
--- a/libc-test/build.rs
+++ b/libc-test/build.rs
@@ -672,6 +672,9 @@ fn main() {
// shouldn't be used in code anyway...
"AF_MAX" | "PF_MAX" => true,
+ // These are not in a glibc release yet, only in kernel headers.
+ "AF_XDP" | "PF_XDP" | "SOL_XDP" if linux => true,
+
// Present on historical versions of iOS, but now removed in more
// recent SDKs
"ARPOP_REQUEST"
diff --git a/src/unix/notbsd/linux/mod.rs b/src/unix/notbsd/linux/mod.rs
index 58037fa578..1aeceb1a40 100644
--- a/src/unix/notbsd/linux/mod.rs
+++ b/src/unix/notbsd/linux/mod.rs
@@ -1058,10 +1058,12 @@ pub const AF_IB: ::c_int = 27;
pub const AF_MPLS: ::c_int = 28;
pub const AF_NFC: ::c_int = 39;
pub const AF_VSOCK: ::c_int = 40;
+pub const AF_XDP: ::c_int = 44;
pub const PF_IB: ::c_int = AF_IB;
pub const PF_MPLS: ::c_int = AF_MPLS;
pub const PF_NFC: ::c_int = AF_NFC;
pub const PF_VSOCK: ::c_int = AF_VSOCK;
+pub const PF_XDP: ::c_int = AF_XDP;
// System V IPC
pub const IPC_PRIVATE: ::key_t = 0;
diff --git a/src/unix/notbsd/linux/other/mod.rs b/src/unix/notbsd/linux/other/mod.rs
index 8e32edf7a7..3ad780fb01 100644
--- a/src/unix/notbsd/linux/other/mod.rs
+++ b/src/unix/notbsd/linux/other/mod.rs
@@ -276,6 +276,7 @@ pub const SOL_IUCV: ::c_int = 277;
pub const SOL_CAIF: ::c_int = 278;
pub const SOL_ALG: ::c_int = 279;
pub const SOL_NFC: ::c_int = 280;
+pub const SOL_XDP: ::c_int = 283;
pub const MSG_TRYHARD: ::c_int = 4;