fix double-processing of DT_RELR relocations in ldso relocating itself
[musl] / src / stat / stat.c
index 67640cc..23570e7 100644 (file)
@@ -1,10 +1,7 @@
 #include <sys/stat.h>
-#include "syscall.h"
-#include "libc.h"
+#include <fcntl.h>
 
-int stat(const char *path, struct stat *buf)
+int stat(const char *restrict path, struct stat *restrict buf)
 {
-       return syscall2(__NR_stat64, (long)path, (long)buf);
+       return fstatat(AT_FDCWD, path, buf, 0);
 }
-
-LFS64(stat);