summaryrefslogtreecommitdiff
path: root/libc-test/build.rs
diff options
context:
space:
mode:
Diffstat (limited to 'libc-test/build.rs')
-rw-r--r--libc-test/build.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/libc-test/build.rs b/libc-test/build.rs
index 98c802e338..3534579425 100644
--- a/libc-test/build.rs
+++ b/libc-test/build.rs
@@ -1631,6 +1631,7 @@ fn test_android(target: &str) {
"linux/rtnetlink.h",
"linux/if_tun.h",
"linux/magic.h",
+ "linux/membarrier.h",
"linux/memfd.h",
"linux/mempolicy.h",
"linux/module.h",
@@ -1782,6 +1783,9 @@ fn test_android(target: &str) {
// GRND_INSECURE was added in platform-tools-30.0.0
"GRND_INSECURE" => true,
+ // kernel 5.10 minimum required
+ "MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED_RSEQ" | "MEMBARRIER_CMD_PRIVATE_EXPEDITED_RSEQ" => true,
+
_ => false,
}
});
@@ -3244,6 +3248,7 @@ fn test_linux(target: &str) {
"linux/keyctl.h",
"linux/magic.h",
"linux/memfd.h",
+ "linux/membarrier.h",
"linux/mempolicy.h",
"linux/mman.h",
"linux/module.h",
@@ -3479,6 +3484,12 @@ fn test_linux(target: &str) {
{
return true;
}
+ // FIXME: Requires >= 5.10 kernel headers
+ if name.starts_with("MEMBARRIER_CMD_REGISTER")
+ || name.starts_with("MEMBARRIER_CMD_PRIVATE")
+ {
+ return true;
+ }
}
match name {
// These constants are not available if gnu headers have been included