diff options
author | Tobias Klauser <tklauser@distanz.ch> | 2018-12-04 17:36:48 +0100 |
---|---|---|
committer | Tobias Klauser <tklauser@distanz.ch> | 2018-12-04 21:04:13 +0100 |
commit | cc22997fd215c4b7c34ac69978bcaffbe2adc5f5 (patch) | |
tree | ba86ff820eecaf9c0dc60134e1ae4765cc571cfb | |
parent | 89faefe20bbe734b77be05eb43b8ae1b7776d26f (diff) | |
download | rust-libc-cc22997fd215c4b7c34ac69978bcaffbe2adc5f5.tar.gz |
Add AF_XDP, PF_XDP and SOL_XDP consts for linux
-rw-r--r-- | libc-test/build.rs | 3 | ||||
-rw-r--r-- | src/unix/notbsd/linux/mod.rs | 2 | ||||
-rw-r--r-- | src/unix/notbsd/linux/other/mod.rs | 1 |
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; |