Skip to content

Commit 303bb82

Browse files
committed
Remove OpenBSD-related dead-code
1 parent e4ce8ac commit 303bb82

File tree

1 file changed

+6
-32
lines changed

1 file changed

+6
-32
lines changed

libc-test/build.rs

Lines changed: 6 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@ fn do_ctest() {
2323
let uclibc = target.contains("uclibc");
2424
let freebsd = target.contains("freebsd");
2525
let mips = target.contains("mips");
26-
let openbsd = target.contains("openbsd");
27-
let bsdlike = freebsd || openbsd;
26+
let bsdlike = freebsd;
2827
let mut cfg = ctest::TestGenerator::new();
2928

3029
match &target {
@@ -113,7 +112,7 @@ fn do_ctest() {
113112
cfg.header("ifaddrs.h");
114113
cfg.header("langinfo.h");
115114

116-
if !openbsd && !freebsd {
115+
if !freebsd {
117116
cfg.header("sys/quota.h");
118117
}
119118

@@ -122,15 +121,11 @@ fn do_ctest() {
122121
}
123122

124123
if !musl && !uclibc {
125-
if !openbsd && !uclibc {
124+
if !uclibc {
126125
cfg.header("execinfo.h");
127126
}
128127

129-
if openbsd {
130-
cfg.header("utmp.h");
131-
} else {
132-
cfg.header("utmpx.h");
133-
}
128+
cfg.header("utmpx.h");
134129
}
135130

136131
if bsdlike {
@@ -252,12 +247,6 @@ fn do_ctest() {
252247
cfg.header("spawn.h");
253248
}
254249

255-
if openbsd {
256-
cfg.header("ufs/ufs/quota.h");
257-
cfg.header("pthread_np.h");
258-
cfg.header("sys/syscall.h");
259-
}
260-
261250
if linux || freebsd || emscripten {
262251
if !uclibc {
263252
cfg.header("aio.h");
@@ -288,12 +277,6 @@ fn do_ctest() {
288277

289278
cfg.field_name(move |struct_, field| {
290279
match field {
291-
"st_birthtime" if openbsd && struct_ == "stat" => {
292-
"__st_birthtime".to_string()
293-
}
294-
"st_birthtime_nsec" if openbsd && struct_ == "stat" => {
295-
"__st_birthtimensec".to_string()
296-
}
297280
// Our stat *_nsec fields normally don't actually exist but are part
298281
// of a timeval struct
299282
s if s.ends_with("_nsec") && struct_.starts_with("stat") => {
@@ -351,7 +334,7 @@ fn do_ctest() {
351334
"LARGE_INTEGER" | "float" | "double" => true,
352335
n if n.starts_with("pthread") => true,
353336
// sem_t is a struct or pointer
354-
"sem_t" if openbsd || freebsd => true,
337+
"sem_t" if freebsd => true,
355338
// mqd_t is a pointer on FreeBSD
356339
"mqd_t" if freebsd => true,
357340

@@ -409,10 +392,6 @@ fn do_ctest() {
409392
// These constants were added in FreeBSD 12
410393
"SF_USER_READAHEAD" | "SO_REUSEPORT_LB" if freebsd => true,
411394

412-
// These constants were removed in OpenBSD 6 (https://git.io/v7gBO
413-
// https://git.io/v7gBq)
414-
"KERN_USERMOUNT" | "KERN_ARND" if openbsd => true,
415-
416395
// These are either unimplemented or optionally built into uClibc
417396
"LC_CTYPE_MASK"
418397
| "LC_NUMERIC_MASK"
@@ -554,7 +533,7 @@ fn do_ctest() {
554533
"sendmmsg" | "recvmmsg" if musl => true,
555534

556535
// typed 2nd arg on linux
557-
"gettimeofday" if linux || freebsd || openbsd => true,
536+
"gettimeofday" if linux || freebsd => true,
558537

559538
"dladdr" if musl => true, // const-ness only added recently
560539

@@ -605,9 +584,6 @@ fn do_ctest() {
605584
// We can wait for the next major release to be compliant with the new API.
606585
// FIXME: unskip these for next major release
607586
"strerror_r" | "madvise" | "msync" | "mprotect" | "recvfrom" | "getpriority" |
608-
// Removed in OpenBSD 6.5
609-
// https://marc.info/?l=openbsd-cvs&m=154723400730318
610-
"mincore" if openbsd => true,
611587

612588
_ => false,
613589
}
@@ -626,8 +602,6 @@ fn do_ctest() {
626602
(struct_ == "aiocb" && field == "aio_buf") ||
627603
// stack_t.ss_sp's type changed from FreeBSD 10 to 11 in svn r294930
628604
(freebsd && struct_ == "stack_t" && field == "ss_sp") ||
629-
// type siginfo_t.si_addr changed from OpenBSD 6.0 to 6.1
630-
(openbsd && struct_ == "siginfo_t" && field == "si_addr") ||
631605
// this one is an anonymous union
632606
(linux && struct_ == "ff_effect" && field == "u")
633607
});

0 commit comments

Comments
 (0)