diff options
Diffstat (limited to 'sysdeps/unix/sysv/linux/access.c')
-rw-r--r-- | sysdeps/unix/sysv/linux/access.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/sysdeps/unix/sysv/linux/access.c b/sysdeps/unix/sysv/linux/access.c index 8f003df..adefbca 100644 --- a/sysdeps/unix/sysv/linux/access.c +++ b/sysdeps/unix/sysv/linux/access.c @@ -21,6 +21,21 @@ #include <sysdep-cancel.h> int +__access_noerrno (const char *file, int type) +{ + int res; + INTERNAL_SYSCALL_DECL (err); +#ifdef __NR_access + res = INTERNAL_SYSCALL_CALL (access, err, file, type); +#else + res = INTERNAL_SYSCALL_CALL (faccessat, err, AT_FDCWD, file, type); +#endif + if (INTERNAL_SYSCALL_ERROR_P (res, err)) + return INTERNAL_SYSCALL_ERRNO (res, err); + return 0; +} + +int __access (const char *file, int type) { #ifdef __NR_access |