summaryrefslogtreecommitdiff
path: root/libc-test
diff options
context:
space:
mode:
authorYuki Okushi <huyuumi.dev@gmail.com>2020-02-24 05:27:05 +0900
committerYuki Okushi <huyuumi.dev@gmail.com>2020-02-25 14:46:21 +0900
commitf77dcc481196b6ec12a05cdd7dede5d870ba72eb (patch)
tree2ace0d7ab67029c5f3fb4f1258a82017c3a3a126 /libc-test
parentd9f264ba73a954b679668b996638ab51ae9d19c0 (diff)
downloadrust-libc-f77dcc481196b6ec12a05cdd7dede5d870ba72eb.tar.gz
Ignore deprecated header file in gnu
Diffstat (limited to 'libc-test')
-rw-r--r--libc-test/build.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/libc-test/build.rs b/libc-test/build.rs
index 47e0a647e1..7668cbecc7 100644
--- a/libc-test/build.rs
+++ b/libc-test/build.rs
@@ -2186,8 +2186,8 @@ fn test_linux(target: &str) {
// `sys/reg.h` is only available on x86 and x86_64
[x86_64 || x86_32]: "sys/reg.h",
// sysctl system call is deprecated and not available on musl
- // It is also unsupported in x32:
- [!(x32 || musl)]: "sys/sysctl.h",
+ // It is also unsupported in x32, deprecated since glibc 2.30:
+ [!(x32 || musl || gnu)]: "sys/sysctl.h",
// <execinfo.h> is not supported by musl:
// https://www.openwall.com/lists/musl/2015/04/09/3
[!musl]: "execinfo.h",
@@ -2426,6 +2426,9 @@ fn test_linux(target: &str) {
// which use Debian 10.0 is too old.
"statx" if sparc64 => true,
+ // FIXME: Deprecated since glibc 2.30. Remove fn once upstream does.
+ "sysctl" if gnu => true,
+
_ => false,
}
});