summaryrefslogtreecommitdiffstats
path: root/libc-top-half/musl/src/stat/mkdir.c
diff options
context:
space:
mode:
Diffstat (limited to 'libc-top-half/musl/src/stat/mkdir.c')
-rw-r--r--libc-top-half/musl/src/stat/mkdir.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/libc-top-half/musl/src/stat/mkdir.c b/libc-top-half/musl/src/stat/mkdir.c
new file mode 100644
index 0000000..32625b7
--- /dev/null
+++ b/libc-top-half/musl/src/stat/mkdir.c
@@ -0,0 +1,12 @@
+#include <sys/stat.h>
+#include <fcntl.h>
+#include "syscall.h"
+
+int mkdir(const char *path, mode_t mode)
+{
+#ifdef SYS_mkdir
+ return syscall(SYS_mkdir, path, mode);
+#else
+ return syscall(SYS_mkdirat, AT_FDCWD, path, mode);
+#endif
+}