Skip to content

Commit

Permalink
freebsd adding execvpe support from 14.1 release
Browse files Browse the repository at this point in the history
(backport <#3745>)
[resolve conflicts - Trevor]
(cherry picked from commit 67d062f)
  • Loading branch information
devnexen authored and tgross35 committed Aug 17, 2024
1 parent 3f102f3 commit 20a1175
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions libc-test/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2575,6 +2575,7 @@ fn test_freebsd(target: &str) {
// skip those that are manually verified
match name {
// FIXME: https://github.com/rust-lang/libc/issues/1272
// Also, `execvpe` is introduced in FreeBSD 14.1
"execv" | "execve" | "execvp" | "execvpe" | "fexecve" => true,

// The `uname` function in the `utsname.h` FreeBSD header is a C
Expand Down
1 change: 1 addition & 0 deletions libc-test/semver/freebsd.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1870,6 +1870,7 @@ eui64_hostton
eui64_ntoa
eui64_ntohost
exect
execvpe
execvP
explicit_bzero
extattr_delete_fd
Expand Down
6 changes: 6 additions & 0 deletions src/unix/bsd/freebsdlike/freebsd/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5648,6 +5648,12 @@ extern "C" {
) -> ::c_int;
pub fn closefrom(lowfd: ::c_int);
pub fn close_range(lowfd: ::c_uint, highfd: ::c_uint, flags: ::c_int) -> ::c_int;

pub fn execvpe(
file: *const ::c_char,
argv: *const *const ::c_char,
envp: *const *const ::c_char,
) -> ::c_int;
}

#[link(name = "memstat")]
Expand Down

0 comments on commit 20a1175

Please sign in to comment.