Skip to content

Commit cc22997

Browse files
committed
Add AF_XDP, PF_XDP and SOL_XDP consts for linux
1 parent 89faefe commit cc22997

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

libc-test/build.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -672,6 +672,9 @@ fn main() {
672672
// shouldn't be used in code anyway...
673673
"AF_MAX" | "PF_MAX" => true,
674674

675+
// These are not in a glibc release yet, only in kernel headers.
676+
"AF_XDP" | "PF_XDP" | "SOL_XDP" if linux => true,
677+
675678
// Present on historical versions of iOS, but now removed in more
676679
// recent SDKs
677680
"ARPOP_REQUEST"

src/unix/notbsd/linux/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1058,10 +1058,12 @@ pub const AF_IB: ::c_int = 27;
10581058
pub const AF_MPLS: ::c_int = 28;
10591059
pub const AF_NFC: ::c_int = 39;
10601060
pub const AF_VSOCK: ::c_int = 40;
1061+
pub const AF_XDP: ::c_int = 44;
10611062
pub const PF_IB: ::c_int = AF_IB;
10621063
pub const PF_MPLS: ::c_int = AF_MPLS;
10631064
pub const PF_NFC: ::c_int = AF_NFC;
10641065
pub const PF_VSOCK: ::c_int = AF_VSOCK;
1066+
pub const PF_XDP: ::c_int = AF_XDP;
10651067

10661068
// System V IPC
10671069
pub const IPC_PRIVATE: ::key_t = 0;

src/unix/notbsd/linux/other/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,7 @@ pub const SOL_IUCV: ::c_int = 277;
276276
pub const SOL_CAIF: ::c_int = 278;
277277
pub const SOL_ALG: ::c_int = 279;
278278
pub const SOL_NFC: ::c_int = 280;
279+
pub const SOL_XDP: ::c_int = 283;
279280

280281
pub const MSG_TRYHARD: ::c_int = 4;
281282

0 commit comments

Comments
 (0)