Skip to content

Commit

Permalink
freebsd adding execvpe support from 14.1 release
Browse files Browse the repository at this point in the history
  • Loading branch information
devnexen committed Jun 9, 2024
1 parent ca70695 commit 075ac33
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 @@ -2541,6 +2541,7 @@ fn test_freebsd(target: &str) {
// skip those that are manually verified
match name {
// FIXME: https://github.com/rust-lang/libc/issues/1272
// 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 @@ -1774,6 +1774,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 @@ -5462,6 +5462,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(
name: *const ::c_char,
argv: *const *const ::c_char,
envp: *const *const ::c_char,
) -> ::c_int;
}

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

0 comments on commit 075ac33

Please sign in to comment.