fix inconsistent signature of __libc_start_main
[musl] / src / stat / lstat.c
index 5e8b84f..6fe004d 100644 (file)
@@ -1,15 +1,11 @@
 #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
+       return fstatat(AT_FDCWD, path, buf, AT_SYMLINK_NOFOLLOW);
 }
 
-LFS64(lstat);
+#if !_REDIR_TIME64
+weak_alias(lstat, lstat64);
+#endif