math: fix fmaf not to depend on FE_TOWARDZERO
[musl] / src / unistd / access.c
index 2c10e58..d6eed68 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
 }