musl - musl - an implementation of the standard library for Linux-based systems

index : musl
musl - an implementation of the standard library for Linux-based systems
summary refs log tree commit diff
path: root/src/stat/stat.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/stat/stat.c')
-rw-r--r--src/stat/stat.c 5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/stat/stat.c b/src/stat/stat.c
index c6de7168..b4433a0a 100644
--- a/src/stat/stat.c
+++ b/src/stat/stat.c
@@ -1,10 +1,15 @@
#include <sys/stat.h>
+#include <fcntl.h>
#include "syscall.h"
#include "libc.h"
int stat(const char *restrict path, struct stat *restrict buf)
{
+#ifdef SYS_stat
return syscall(SYS_stat, path, buf);
+#else
+ return syscall(SYS_fstatat, AT_FDCWD, path, buf, 0);
+#endif
}
LFS64(stat);
generated by cgit v1.2.1 (git 2.18.0) at 2025年09月16日 04:41:40 +0000

AltStyle によって変換されたページ (->オリジナル) /