refactor all stat functions in terms of fstatat
[musl] / src / stat / lstat.c
index 5b89f29..8b365ba 100644 (file)
@@ -4,11 +4,7 @@
 
 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);
 }
 
 weak_alias(lstat, lstat64);