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 <rust-lang#3745>)
(cherry picked from commit 67d062f)
  • Loading branch information
devnexen authored and tgross35 committed Aug 17, 2024
1 parent dbedd4a commit 0ef0cfd
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 @@ -2582,6 +2582,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 @@ -1875,6 +1875,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 @@ -5662,6 +5662,12 @@ extern "C" {
idx1: ::c_ulong,
idx2: ::c_ulong,
) -> ::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 0ef0cfd

Please sign in to comment.