#include <sys/stat.h>
-#include "syscall.h"
-#include "libc.h"
+#include <fcntl.h>
-int lstat(const char *path, struct stat *buf)
+int lstat(const char *restrict path, struct stat *restrict buf)
{
- return syscall(SYS_lstat, path, buf);
+ return fstatat(AT_FDCWD, path, buf, AT_SYMLINK_NOFOLLOW);
}
-
-LFS64(lstat);