Skip to content

Commit 886bb3f

Browse files
committed
filter out the struct test rather than removing the header
1 parent dba4138 commit 886bb3f

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

libc-test/build.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1950,6 +1950,7 @@ fn test_linux(target: &str) {
19501950
"syslog.h",
19511951
"termios.h",
19521952
"time.h",
1953+
"ucontext.h",
19531954
"unistd.h",
19541955
"utime.h",
19551956
"utmp.h",
@@ -1967,10 +1968,6 @@ fn test_linux(target: &str) {
19671968
// <execinfo.h> is not supported by musl:
19681969
// https://www.openwall.com/lists/musl/2015/04/09/3
19691970
[!musl]: "execinfo.h",
1970-
// ucontext_t added a new field as of glibc 2.28; our struct definition is
1971-
// conservative and omits the field, but that means the size doesn't match for newer
1972-
// glibcs
1973-
[!gnu]: "ucontext.h",
19741971
}
19751972

19761973
// Include linux headers at the end:
@@ -2101,6 +2098,11 @@ fn test_linux(target: &str) {
21012098
// FIXME: musl version using by mips build jobs 1.0.15 is ancient:
21022099
"ifmap" | "ifreq" | "ifconf" if mips32_musl => true,
21032100

2101+
// ucontext_t added a new field as of glibc 2.28; our struct definition is
2102+
// conservative and omits the field, but that means the size doesn't match for newer
2103+
// glibcs (see https://github.com/rust-lang/libc/issues/1410)
2104+
"ucontext_t" if gnu => true,
2105+
21042106
_ => false,
21052107
}
21062108
});

0 commit comments

Comments
 (0)