remove another invalid skip of locking in ungetwc
[oweals/musl.git] / src / unistd / access.c
index 2c10e58cc94bb9f254b2885251e3f02a9f6326ad..d6eed6839822f32bebf333218b6e020d08bbbd28 100644 (file)
@@ -1,7 +1,12 @@
 #include <unistd.h>
+#include <fcntl.h>
 #include "syscall.h"
 
 int access(const char *filename, int amode)
 {
-       return syscall2(__NR_access, (long)filename, amode);
+#ifdef SYS_access
+       return syscall(SYS_access, filename, amode);
+#else
+       return syscall(SYS_faccessat, AT_FDCWD, filename, amode, 0);
+#endif
 }