Skip to content

Commit

Permalink
Auto merge of #3490 - lcheylus:openbsd-waitid, r=JohnTitor
Browse files Browse the repository at this point in the history
Add waitid function for OpenBSD

To compile on OpenBSD a Rust project using [shared_child](https://docs.rs/shared_child/) crate, I need `waitid` libc function.

- 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
  • Loading branch information
bors committed Dec 20, 2023
2 parents 42a7ec1 + 4e0bfc4 commit 8fd4fa1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions libc-test/semver/openbsd.txt
Expand Up @@ -1274,4 +1274,5 @@ utimensat
utmp
utrace
wait4
waitid
xucred
6 changes: 6 additions & 0 deletions src/unix/bsd/netbsdlike/mod.rs
Expand Up @@ -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" {
Expand Down
6 changes: 0 additions & 6 deletions src/unix/bsd/netbsdlike/netbsd/mod.rs
Expand Up @@ -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);
Expand Down

0 comments on commit 8fd4fa1

Please sign in to comment.