Skip to content

Commit 5097b81

Browse files
committed
Remove removed items in OpenBSD
1 parent 8a846aa commit 5097b81

File tree

6 files changed

+3
-23
lines changed

6 files changed

+3
-23
lines changed

libc-test/build.rs

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -523,10 +523,6 @@ fn test_openbsd(target: &str) {
523523

524524
cfg.skip_const(move |name| {
525525
match name {
526-
// Removed in OpenBSD 6.0
527-
"KERN_USERMOUNT" | "KERN_ARND" => true,
528-
// Removed in OpenBSD 7.2
529-
"KERN_NSELCOLL" => true,
530526
// Good chance it's going to be wrong depending on the host release
531527
"KERN_MAXID" | "NET_RT_MAXID" => true,
532528
"EV_SYSFLAGS" => true,
@@ -539,20 +535,12 @@ fn test_openbsd(target: &str) {
539535
// FIXME: https://github.com/rust-lang/libc/issues/1272
540536
"execv" | "execve" | "execvp" | "execvpe" => true,
541537

542-
// Removed in OpenBSD 6.5
543-
// https://marc.info/?l=openbsd-cvs&m=154723400730318
544-
"mincore" => true,
545-
546538
// futex() has volatile arguments, but that doesn't exist in Rust.
547539
"futex" => true,
548540

549541
// Available for openBSD 7.3
550542
"mimmutable" => true,
551543

552-
// Removed in OpenBSD 7.5
553-
// https://marc.info/?l=openbsd-cvs&m=170239504300386
554-
"syscall" => true,
555-
556544
_ => false,
557545
}
558546
});

libc-test/semver/openbsd.txt

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,6 @@ ITIMER_PROF
331331
ITIMER_REAL
332332
ITIMER_VIRTUAL
333333
KERN_ARGMAX
334-
KERN_ARND
335334
KERN_AUDIO
336335
KERN_BOOTTIME
337336
KERN_CACHEPCT
@@ -372,7 +371,6 @@ KERN_NFILES
372371
KERN_NGROUPS
373372
KERN_NOSUIDCOREDUMP
374373
KERN_NPROCS
375-
KERN_NSELCOLL
376374
KERN_NTHREADS
377375
KERN_NUMVNODES
378376
KERN_OSRELEASE
@@ -422,7 +420,6 @@ KERN_TIMECOUNTER
422420
KERN_TIMEOUT_STATS
423421
KERN_TTY
424422
KERN_TTYCOUNT
425-
KERN_USERMOUNT
426423
KERN_VERSION
427424
KERN_WATCHDOG
428425
KVE_ADV_NORMAL
@@ -1129,7 +1126,6 @@ memmem
11291126
memrchr
11301127
mfs_args
11311128
mimmutable
1132-
mincore
11331129
mkdirat
11341130
mkfifoat
11351131
mknodat
@@ -1279,7 +1275,6 @@ strndup
12791275
strsignal
12801276
strtonum
12811277
sync
1282-
syscall
12831278
sysctl
12841279
tcp_info
12851280
telldir

src/unix/bsd/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -632,6 +632,7 @@ extern "C" {
632632
pub fn ioctl(fd: ::c_int, request: ::c_ulong, ...) -> ::c_int;
633633
pub fn kqueue() -> ::c_int;
634634
pub fn unmount(target: *const ::c_char, arg: ::c_int) -> ::c_int;
635+
#[cfg(not(target_os = "openbsd"))]
635636
pub fn syscall(num: ::c_int, ...) -> ::c_int;
636637
#[cfg_attr(target_os = "netbsd", link_name = "__getpwent50")]
637638
pub fn getpwent() -> *mut passwd;

src/unix/bsd/netbsdlike/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -672,7 +672,6 @@ extern "C" {
672672
addrlen: *mut ::socklen_t,
673673
flags: ::c_int,
674674
) -> ::c_int;
675-
pub fn mincore(addr: *mut ::c_void, len: ::size_t, vec: *mut ::c_char) -> ::c_int;
676675
#[cfg_attr(target_os = "netbsd", link_name = "__clock_getres50")]
677676
pub fn clock_getres(clk_id: ::clockid_t, tp: *mut ::timespec) -> ::c_int;
678677
#[cfg_attr(target_os = "netbsd", link_name = "__clock_gettime50")]

src/unix/bsd/netbsdlike/netbsd/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2902,6 +2902,8 @@ extern "C" {
29022902
result: *mut *mut ::group,
29032903
) -> ::c_int;
29042904

2905+
pub fn mincore(addr: *mut ::c_void, len: ::size_t, vec: *mut ::c_char) -> ::c_int;
2906+
29052907
pub fn updwtmpx(file: *const ::c_char, ut: *const utmpx) -> ::c_int;
29062908
pub fn getlastlogx(fname: *const ::c_char, uid: ::uid_t, ll: *mut lastlogx) -> *mut lastlogx;
29072909
pub fn updlastlogx(fname: *const ::c_char, uid: ::uid_t, ll: *mut lastlogx) -> ::c_int;

src/unix/bsd/netbsdlike/openbsd/mod.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1554,21 +1554,16 @@ pub const KERN_NTHREADS: ::c_int = 26;
15541554
pub const KERN_OSVERSION: ::c_int = 27;
15551555
pub const KERN_SOMAXCONN: ::c_int = 28;
15561556
pub const KERN_SOMINCONN: ::c_int = 29;
1557-
#[deprecated(since = "0.2.71", note = "Removed in OpenBSD 6.0")]
1558-
pub const KERN_USERMOUNT: ::c_int = 30;
15591557
pub const KERN_NOSUIDCOREDUMP: ::c_int = 32;
15601558
pub const KERN_FSYNC: ::c_int = 33;
15611559
pub const KERN_SYSVMSG: ::c_int = 34;
15621560
pub const KERN_SYSVSEM: ::c_int = 35;
15631561
pub const KERN_SYSVSHM: ::c_int = 36;
1564-
#[deprecated(since = "0.2.71", note = "Removed in OpenBSD 6.0")]
1565-
pub const KERN_ARND: ::c_int = 37;
15661562
pub const KERN_MSGBUFSIZE: ::c_int = 38;
15671563
pub const KERN_MALLOCSTATS: ::c_int = 39;
15681564
pub const KERN_CPTIME: ::c_int = 40;
15691565
pub const KERN_NCHSTATS: ::c_int = 41;
15701566
pub const KERN_FORKSTAT: ::c_int = 42;
1571-
pub const KERN_NSELCOLL: ::c_int = 43;
15721567
pub const KERN_TTY: ::c_int = 44;
15731568
pub const KERN_CCPU: ::c_int = 45;
15741569
pub const KERN_FSCALE: ::c_int = 46;

0 commit comments

Comments
 (0)