projects
/
musl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
regcomp: propagate allocation failures
[musl]
/
src
/
stat
/
lstat.c
diff --git
a/src/stat/lstat.c
b/src/stat/lstat.c
index
8f60358
..
5e8b84f
100644
(file)
--- a/
src/stat/lstat.c
+++ b/
src/stat/lstat.c
@@
-1,10
+1,15
@@
#include <sys/stat.h>
#include <sys/stat.h>
+#include <fcntl.h>
#include "syscall.h"
#include "libc.h"
int lstat(const char *restrict path, struct stat *restrict buf)
{
#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);
return syscall(SYS_lstat, path, buf);
+#else
+ return syscall(SYS_fstatat, AT_FDCWD, path, buf, AT_SYMLINK_NOFOLLOW);
+#endif
}
LFS64(lstat);
}
LFS64(lstat);