Auto merge of #2467 - rtzoeller:dfly_fexecve, r=JohnTitor

Add fexecve() to DragonFly

DragonFly 6.0 added support for `fexecve(2)`.

Implementing it with a mismatched signature from what C exposes, as outlined in #1272, for consistency with other platforms.

Tested with https://github.com/nix-rust/nix/pull/1577
This commit is contained in:
bors 2021-10-21 00:37:19 +00:00
commit 1045d0190e
4 changed files with 7 additions and 6 deletions

View file

@ -1336,7 +1336,7 @@ fn test_dragonflybsd(target: &str) {
// skip those that are manually verified
match name {
// FIXME: https://github.com/rust-lang/libc/issues/1272
"execv" | "execve" | "execvp" => true,
"execv" | "execve" | "execvp" | "fexecve" => true,
"getrlimit" | "getrlimit64" | // non-int in 1st arg
"setrlimit" | "setrlimit64" | // non-int in 1st arg

View file

@ -1227,6 +1227,7 @@ faccessat
fchdir
fchflags
fdopendir
fexecve
fmemopen
forkpty
fparseln

View file

@ -2130,11 +2130,6 @@ extern "C" {
msgflg: ::c_int,
) -> ::c_int;
pub fn cfmakesane(termios: *mut ::termios);
pub fn fexecve(
fd: ::c_int,
argv: *const *const ::c_char,
envp: *const *const ::c_char,
) -> ::c_int;
pub fn pdfork(fdp: *mut ::c_int, flags: ::c_int) -> ::pid_t;
pub fn pdgetpid(fd: ::c_int, pidp: *mut ::pid_t) -> ::c_int;

View file

@ -1441,6 +1441,11 @@ extern "C" {
pub fn duplocale(base: ::locale_t) -> ::locale_t;
pub fn endutxent();
pub fn fchflags(fd: ::c_int, flags: ::c_ulong) -> ::c_int;
pub fn fexecve(
fd: ::c_int,
argv: *const *const ::c_char,
envp: *const *const ::c_char,
) -> ::c_int;
pub fn futimens(fd: ::c_int, times: *const ::timespec) -> ::c_int;
pub fn getdomainname(name: *mut ::c_char, len: ::c_int) -> ::c_int;
pub fn getgrent_r(