From 4e0bfc4392c5784525814b5d11fc0c1f5465d69d Mon Sep 17 00:00:00 2001 From: Laurent Cheylus Date: Tue, 19 Dec 2023 17:23:54 +0100 Subject: [PATCH] Add waitid function for OpenBSD - Same prototype for waitid function on NetBSD and OpenBSD. - To support it on OpenBSD, move definition from src/unix/bsd/netbsdlike/netbsd/mod.rs to src/unix/bsd/netbsdlike/mod.rs => available on both BSD OS Signed-off-by: Laurent Cheylus --- libc-test/semver/openbsd.txt | 1 + src/unix/bsd/netbsdlike/mod.rs | 6 ++++++ src/unix/bsd/netbsdlike/netbsd/mod.rs | 6 ------ 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/libc-test/semver/openbsd.txt b/libc-test/semver/openbsd.txt index fe3d602f54eb7..4f3e01f7390ec 100644 --- a/libc-test/semver/openbsd.txt +++ b/libc-test/semver/openbsd.txt @@ -1274,4 +1274,5 @@ utimensat utmp utrace wait4 +waitid xucred diff --git a/src/unix/bsd/netbsdlike/mod.rs b/src/unix/bsd/netbsdlike/mod.rs index 07cdec800658f..a71d48ca7ffa4 100644 --- a/src/unix/bsd/netbsdlike/mod.rs +++ b/src/unix/bsd/netbsdlike/mod.rs @@ -747,6 +747,12 @@ extern "C" { argv: *const *const ::c_char, envp: *const *const ::c_char, ) -> ::c_int; + pub fn waitid( + idtype: idtype_t, + id: ::id_t, + infop: *mut ::siginfo_t, + options: ::c_int, + ) -> ::c_int; } extern "C" { diff --git a/src/unix/bsd/netbsdlike/netbsd/mod.rs b/src/unix/bsd/netbsdlike/netbsd/mod.rs index 63957d17834f0..f24b82987e1a2 100644 --- a/src/unix/bsd/netbsdlike/netbsd/mod.rs +++ b/src/unix/bsd/netbsdlike/netbsd/mod.rs @@ -2776,12 +2776,6 @@ extern "C" { timeout: *const ::timespec, ) -> ::c_int; pub fn sigwaitinfo(set: *const sigset_t, info: *mut siginfo_t) -> ::c_int; - pub fn waitid( - idtype: idtype_t, - id: ::id_t, - infop: *mut ::siginfo_t, - options: ::c_int, - ) -> ::c_int; pub fn duplocale(base: ::locale_t) -> ::locale_t; pub fn freelocale(loc: ::locale_t);