X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Fstat%2Fstat.c;h=b4433a0a7cd13893b6889e89cfc3eac7e98178d1;hb=2fab90a71acd3698954c08b9062db67188443dd7;hp=67640cc1589a591759248971c58cbc4776006d2d;hpb=0b44a0315b47dd8eced9f3b7f31580cf14bbfc01;p=musl diff --git a/src/stat/stat.c b/src/stat/stat.c index 67640cc1..b4433a0a 100644 --- a/src/stat/stat.c +++ b/src/stat/stat.c @@ -1,10 +1,15 @@ #include +#include #include "syscall.h" #include "libc.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); +#ifdef SYS_stat + return syscall(SYS_stat, path, buf); +#else + return syscall(SYS_fstatat, AT_FDCWD, path, buf, 0); +#endif } LFS64(stat);