X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Fstat%2Fstat.c;h=b4433a0a7cd13893b6889e89cfc3eac7e98178d1;hb=c1020cf21e7c09cf313c98b69d5c5af8f3895502;hp=c5491eb0ed26364d2d7ce5f6442c7ba00087dee8;hpb=aa398f56fa398f2202b04e82c67f822f3233786f;p=musl diff --git a/src/stat/stat.c b/src/stat/stat.c index c5491eb0..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) { +#ifdef SYS_stat return syscall(SYS_stat, path, buf); +#else + return syscall(SYS_fstatat, AT_FDCWD, path, buf, 0); +#endif } LFS64(stat);