diff options
Diffstat (limited to 'src/stat/lstat.c')
-rw-r--r-- | src/stat/lstat.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/stat/lstat.c b/src/stat/lstat.c index 8f60358c..5e8b84fc 100644 --- a/src/stat/lstat.c +++ b/src/stat/lstat.c @@ -1,10 +1,15 @@ #include <sys/stat.h> +#include <fcntl.h> #include "syscall.h" #include "libc.h" int lstat(const char *restrict path, struct stat *restrict 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); |