diff options
Diffstat (limited to 'libc/sysdeps/linux/common/access.c')
-rw-r--r-- | libc/sysdeps/linux/common/access.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libc/sysdeps/linux/common/access.c b/libc/sysdeps/linux/common/access.c index a075d421a..139b7b76b 100644 --- a/libc/sysdeps/linux/common/access.c +++ b/libc/sysdeps/linux/common/access.c @@ -9,4 +9,14 @@ #include <sys/syscall.h> #include <unistd.h> + +#if defined __NR_faccessat && !defined __NR_access +# include <fcntl.h> +int access(const char *pathname, int mode) +{ + return faccessat(AT_FDCWD, pathname, mode, 0); +} + +#else _syscall2(int, access, const char *, pathname, int, mode) +#endif |