From cefa53b7bbab47586f76faeb190cd3240f16a8fc Mon Sep 17 00:00:00 2001 From: David Carlier Date: Tue, 10 Oct 2023 21:10:30 +0100 Subject: [PATCH] adding exect/execvP for FreeBSD/DragonflyBSD --- libc-test/semver/dragonfly.txt | 2 ++ libc-test/semver/freebsd.txt | 2 ++ src/unix/bsd/freebsdlike/mod.rs | 11 +++++++++++ 3 files changed, 15 insertions(+) diff --git a/libc-test/semver/dragonfly.txt b/libc-test/semver/dragonfly.txt index 1e1261cad8803..08d7124c16f3f 100644 --- a/libc-test/semver/dragonfly.txt +++ b/libc-test/semver/dragonfly.txt @@ -1287,6 +1287,8 @@ eui64_aton eui64_hostton eui64_ntoa eui64_ntohost +exect +execvP exit_status explicit_bzero faccessat diff --git a/libc-test/semver/freebsd.txt b/libc-test/semver/freebsd.txt index d7c7dd97bad8d..bf601d05c0b93 100644 --- a/libc-test/semver/freebsd.txt +++ b/libc-test/semver/freebsd.txt @@ -1770,6 +1770,8 @@ eui64_aton eui64_hostton eui64_ntoa eui64_ntohost +exect +execvP explicit_bzero extattr_delete_fd extattr_delete_file diff --git a/src/unix/bsd/freebsdlike/mod.rs b/src/unix/bsd/freebsdlike/mod.rs index 8eb4a8e7bf480..313bf588d72b4 100644 --- a/src/unix/bsd/freebsdlike/mod.rs +++ b/src/unix/bsd/freebsdlike/mod.rs @@ -1772,6 +1772,17 @@ extern "C" { len: ::c_int, ) -> ::c_int; pub fn reboot(howto: ::c_int) -> ::c_int; + + pub fn exect( + path: *const ::c_char, + argv: *const *mut ::c_char, + envp: *const *mut ::c_char, + ) -> ::c_int; + pub fn execvP( + file: *const ::c_char, + search_path: *const ::c_char, + argv: *const *mut ::c_char, + ) -> ::c_int; } #[link(name = "rt")]