Skip to content

Commit b05f659

Browse files
committed
Skip some items changed in glibc 2.31
1 parent e59402d commit b05f659

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

libc-test/build.rs

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2230,6 +2230,7 @@ fn test_linux(target: &str) {
22302230
let x86_64 = target.contains("x86_64");
22312231
let aarch64_musl = target.contains("aarch64") && musl;
22322232
let gnuabihf = target.contains("gnueabihf");
2233+
let x86_64_gnux32 = target.contains("gnux32") && x86_64;
22332234

22342235
let mut cfg = ctest_cfg();
22352236
cfg.define("_GNU_SOURCE", None);
@@ -2548,6 +2549,10 @@ fn test_linux(target: &str) {
25482549
// - these constants are used by the glibc implementation.
25492550
n if musl && n.contains("__SIZEOF_PTHREAD") => true,
25502551

2552+
// FIXME: It was extended to 4096 since glibc 2.31 (Linux 5.4).
2553+
// We should do so after a while.
2554+
"SOMAXCONN" if gnu => true,
2555+
25512556
_ => false,
25522557
}
25532558
});
@@ -2589,6 +2594,9 @@ fn test_linux(target: &str) {
25892594
// FIXME: Deprecated since glibc 2.30. Remove fn once upstream does.
25902595
"sysctl" if gnu => true,
25912596

2597+
// FIXME: It now takes c_void instead of timezone since glibc 2.31.
2598+
"gettimeofday" if gnu => true,
2599+
25922600
_ => false,
25932601
}
25942602
});
@@ -2646,7 +2654,11 @@ fn test_linux(target: &str) {
26462654
// FIXME: After musl 1.1.24, the type becomes `int` instead of `unsigned short`.
26472655
(struct_ == "ipc_perm" && field == "__seq" && aarch64_musl) ||
26482656
// glibc uses unnamed fields here and Rust doesn't support that yet
2649-
(struct_ == "timex" && field.starts_with("__unused"))
2657+
(struct_ == "timex" && field.starts_with("__unused")) ||
2658+
// FIXME: It now takes mode_t since glibc 2.31 on some targets.
2659+
(struct_ == "ipc_perm" && field == "mode"
2660+
&& ((x86_64 || i686 || arm) && gnu || x86_64_gnux32)
2661+
)
26502662
});
26512663

26522664
cfg.skip_roundtrip(move |s| match s {

0 commit comments

Comments
 (0)