diff options
author | bors <bors@rust-lang.org> | 2023-04-22 02:37:32 +0000 |
---|---|---|
committer | bors <bors@rust-lang.org> | 2023-04-22 02:37:32 +0000 |
commit | 2de3ab95f874a4696d9518a6269e8f1e7dba388e (patch) | |
tree | 41e64d50ff31cf3cac464ce6e7118a0edb753f05 /libc-test/build.rs | |
parent | 9e9021163c29e571292b2731326ec4ddb8b8110d (diff) | |
parent | f3e1417b9ff392372a374fac2ac84e4c984b6bf5 (diff) | |
download | rust-libc-2de3ab95f874a4696d9518a6269e8f1e7dba388e.tar.gz |
Auto merge of #3159 - tatref:linux-madv, r=JohnTitor
Linux madv
This is a followup of #2818
Diffstat (limited to 'libc-test/build.rs')
-rw-r--r-- | libc-test/build.rs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/libc-test/build.rs b/libc-test/build.rs index ac0f996fc4..85536110cf 100644 --- a/libc-test/build.rs +++ b/libc-test/build.rs @@ -1788,6 +1788,14 @@ fn test_android(target: &str) { // kernel 5.10 minimum required "MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED_RSEQ" | "MEMBARRIER_CMD_PRIVATE_EXPEDITED_RSEQ" => true, + // kernel 5.18 minimum + | "MADV_COLD" + | "MADV_DONTNEED_LOCKED" + | "MADV_PAGEOUT" + | "MADV_POPULATE_READ" + | "MADV_POPULATE_WRITE" => true, + + _ => false, } }); @@ -3714,6 +3722,12 @@ fn test_linux(target: &str) { // Added in Linux 5.13 "PTRACE_GET_RSEQ_CONFIGURATION" if sparc64 => true, + | "MADV_COLD" + | "MADV_PAGEOUT" + | "MADV_POPULATE_READ" + | "MADV_POPULATE_WRITE" + if sparc64 || musl => true, + // FIXME: Requires more recent kernel headers | "IFLA_PARENT_DEV_NAME" // linux v5.13+ | "IFLA_PARENT_DEV_BUS_NAME" // linux v5.13+ @@ -3721,6 +3735,7 @@ fn test_linux(target: &str) { | "IFLA_TSO_MAX_SIZE" // linux v5.18+ | "IFLA_TSO_MAX_SEGS" // linux v5.18+ | "IFLA_ALLMULTI" // linux v6.0+ + | "MADV_DONTNEED_LOCKED" // linux v5.18+ => true, "SCTP_FUTURE_ASSOC" | "SCTP_CURRENT_ASSOC" | "SCTP_ALL_ASSOC" | "SCTP_PEER_ADDR_THLDS_V2" => true, // linux 5.5+ |