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