summaryrefslogtreecommitdiffstats
path: root/usr/klibc/stat.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr/klibc/stat.c')
-rw-r--r--usr/klibc/stat.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/usr/klibc/stat.c b/usr/klibc/stat.c
new file mode 100644
index 0000000..673fb06
--- /dev/null
+++ b/usr/klibc/stat.c
@@ -0,0 +1,10 @@
+#include <fcntl.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/syscall.h>
+
+int stat(const char *path, struct stat *buf)
+{
+ return fstatat(AT_FDCWD, path, buf, 0);
+}