Index: fusl/src/stat/lstat.c |
diff --git a/fusl/src/stat/lstat.c b/fusl/src/stat/lstat.c |
new file mode 100644 |
index 0000000000000000000000000000000000000000..5e8b84fcffad624fb426986681996a575b3f87f8 |
--- /dev/null |
+++ b/fusl/src/stat/lstat.c |
@@ -0,0 +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); |