Skip to content

Commit

Permalink
Auto merge of #3372 - SteveLauC:execveat, r=JohnTitor
Browse files Browse the repository at this point in the history
add execveat for glibc

Addd [`execveat(2)`](https://man7.org/linux/man-pages/man2/execveat.2.html) for glibc

```
       #include <linux/fcntl.h>      /* Definition of AT_* constants */
       #include <unistd.h>

       int execveat(int dirfd, const char *pathname,
                    char *const _Nullable argv[],
                    char *const _Nullable envp[],
                    int flags);
```

This wrapper is not available on:
1. musl
2. uClibc
3. bionic (Android)
  • Loading branch information
bors committed Oct 5, 2023
2 parents 6e02a32 + d3910f6 commit aa065c6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions libc-test/semver/linux-gnu.txt
Expand Up @@ -664,3 +664,4 @@ gnu_basename
getmntent_r
putpwent
putgrent
execveat
8 changes: 8 additions & 0 deletions src/unix/linux_like/linux/gnu/mod.rs
Expand Up @@ -1391,6 +1391,14 @@ extern "C" {
buf: *mut ::c_char,
buflen: ::c_int,
) -> *mut ::mntent;

pub fn execveat(
dirfd: ::c_int,
pathname: *const ::c_char,
argv: *const *mut c_char,
envp: *const *mut c_char,
flags: ::c_int,
) -> ::c_int;
}

cfg_if! {
Expand Down

0 comments on commit aa065c6

Please sign in to comment.