Skip to content

Commit

Permalink
add euidaccess and eaccess on gnu/musl linux
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveLauC committed Oct 8, 2022
1 parent 2dfe1ab commit e01c428
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions libc-test/semver/linux-gnu.txt
Expand Up @@ -647,3 +647,5 @@ timex
utmpname
utmpx
utmpxname
euidaccess
eaccess
2 changes: 2 additions & 0 deletions libc-test/semver/linux-musl.txt
Expand Up @@ -48,3 +48,5 @@ process_vm_writev
pwritev64
reallocarray
timex
euidaccess
eaccess
3 changes: 3 additions & 0 deletions src/unix/linux_like/linux/gnu/mod.rs
Expand Up @@ -1315,6 +1315,9 @@ extern "C" {

pub fn memfd_create(name: *const ::c_char, flags: ::c_uint) -> ::c_int;
pub fn mlock2(addr: *const ::c_void, len: ::size_t, flags: ::c_uint) -> ::c_int;

pub fn euidaccess(pathname: *const ::c_char, mode: ::c_int) -> ::c_int;
pub fn eaccess(pathname: *const ::c_char, mode: ::c_int) -> ::c_int;
}

extern "C" {
Expand Down
3 changes: 3 additions & 0 deletions src/unix/linux_like/linux/musl/mod.rs
Expand Up @@ -754,6 +754,9 @@ extern "C" {
pub fn memfd_create(name: *const ::c_char, flags: ::c_uint) -> ::c_int;
pub fn mlock2(addr: *const ::c_void, len: ::size_t, flags: ::c_uint) -> ::c_int;
pub fn malloc_usable_size(ptr: *mut ::c_void) -> ::size_t;

pub fn euidaccess(pathname: *const ::c_char, mode: ::c_int) -> ::c_int;
pub fn eaccess(pathname: *const ::c_char, mode: ::c_int) -> ::c_int;
}

cfg_if! {
Expand Down

0 comments on commit e01c428

Please sign in to comment.