@@ -2085,6 +2085,7 @@ fn test_linux(target: &str) {
2085
2085
let x86_32 = target. contains ( "i686" ) ;
2086
2086
let x86_64 = target. contains ( "x86_64" ) ;
2087
2087
let aarch64_musl = target. contains ( "aarch64" ) && musl;
2088
+ let gnuabihf = target. contains ( "gnueabihf" ) ;
2088
2089
2089
2090
let mut cfg = ctest_cfg ( ) ;
2090
2091
cfg. define ( "_GNU_SOURCE" , None ) ;
@@ -2182,12 +2183,14 @@ fn test_linux(target: &str) {
2182
2183
"errno.h" ,
2183
2184
// `sys/io.h` is only available on x86*, Alpha, IA64, and 32-bit
2184
2185
// ARM: https://bugzilla.redhat.com/show_bug.cgi?id=1116162
2185
- [ x86_64 || x86_32 || arm] : "sys/io.h" ,
2186
+ // Also unavailable on gnuabihf with glibc 2.30.
2187
+ // https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=6b33f373c7b9199e00ba5fbafd94ac9bfb4337b1
2188
+ [ ( x86_64 || x86_32 || arm) && !gnuabihf] : "sys/io.h" ,
2186
2189
// `sys/reg.h` is only available on x86 and x86_64
2187
2190
[ x86_64 || x86_32] : "sys/reg.h" ,
2188
2191
// sysctl system call is deprecated and not available on musl
2189
- // It is also unsupported in x32:
2190
- [ !( x32 || musl) ] : "sys/sysctl.h" ,
2192
+ // It is also unsupported in x32, deprecated since glibc 2.30 :
2193
+ [ !( x32 || musl || gnu ) ] : "sys/sysctl.h" ,
2191
2194
// <execinfo.h> is not supported by musl:
2192
2195
// https://www.openwall.com/lists/musl/2015/04/09/3
2193
2196
[ !musl] : "execinfo.h" ,
@@ -2329,6 +2332,12 @@ fn test_linux(target: &str) {
2329
2332
// glibcs (see https://github.com/rust-lang/libc/issues/1410)
2330
2333
"ucontext_t" if gnu => true ,
2331
2334
2335
+ // FIXME: Somehow we cannot include headers correctly in glibc 2.30.
2336
+ // So let's ignore for now and re-visit later.
2337
+ // Probably related: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91085
2338
+ "statx" => true ,
2339
+ "statx_timestamp" => true ,
2340
+
2332
2341
_ => false ,
2333
2342
}
2334
2343
} ) ;
@@ -2426,6 +2435,9 @@ fn test_linux(target: &str) {
2426
2435
// which use Debian 10.0 is too old.
2427
2436
"statx" if sparc64 => true ,
2428
2437
2438
+ // FIXME: Deprecated since glibc 2.30. Remove fn once upstream does.
2439
+ "sysctl" if gnu => true ,
2440
+
2429
2441
_ => false ,
2430
2442
}
2431
2443
} ) ;
0 commit comments