projects
/
musl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix crashing sigsetjmp on s390x
[musl]
/
src
/
stat
/
stat.c
diff --git
a/src/stat/stat.c
b/src/stat/stat.c
index
c5491eb
..
b4433a0
100644
(file)
--- a/
src/stat/stat.c
+++ b/
src/stat/stat.c
@@
-1,10
+1,15
@@
#include <sys/stat.h>
#include <sys/stat.h>
+#include <fcntl.h>
#include "syscall.h"
#include "libc.h"
#include "syscall.h"
#include "libc.h"
-int stat(const char *
path, struct stat *
buf)
+int stat(const char *
restrict path, struct stat *restrict
buf)
{
{
+#ifdef SYS_stat
return syscall(SYS_stat, path, buf);
return syscall(SYS_stat, path, buf);
+#else
+ return syscall(SYS_fstatat, AT_FDCWD, path, buf, 0);
+#endif
}
LFS64(stat);
}
LFS64(stat);