diff options
Diffstat (limited to 'libc-test/build.rs')
-rw-r--r-- | libc-test/build.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/libc-test/build.rs b/libc-test/build.rs index efa8f1304e..4e67c6eb5d 100644 --- a/libc-test/build.rs +++ b/libc-test/build.rs @@ -1632,6 +1632,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", @@ -1783,6 +1784,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, } }); @@ -3249,6 +3253,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", @@ -3484,6 +3489,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 |