X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Fstat%2Flstat.c;h=5e8b84fcffad624fb426986681996a575b3f87f8;hb=c243d6f09570010a448789dd296b14b7a61cb2ea;hp=3b22e620bd21399def24bf2ae70febf12a1a2b3e;hpb=cfe373146d232d7c89a60920f77b9451bcfee96b;p=musl diff --git a/src/stat/lstat.c b/src/stat/lstat.c index 3b22e620..5e8b84fc 100644 --- a/src/stat/lstat.c +++ b/src/stat/lstat.c @@ -1,10 +1,15 @@ #include +#include #include "syscall.h" #include "libc.h" -int lstat(const char *path, struct stat *buf) +int lstat(const char *restrict path, struct stat *restrict buf) { - return syscall2(__NR_lstat, (long)path, (long)buf); +#ifdef SYS_lstat + return syscall(SYS_lstat, path, buf); +#else + return syscall(SYS_fstatat, AT_FDCWD, path, buf, AT_SYMLINK_NOFOLLOW); +#endif } LFS64(lstat);