summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libc/sysdeps/linux/common/mknod.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/libc/sysdeps/linux/common/mknod.c b/libc/sysdeps/linux/common/mknod.c
index 913cea29b..8629c2070 100644
--- a/libc/sysdeps/linux/common/mknod.c
+++ b/libc/sysdeps/linux/common/mknod.c
@@ -28,6 +28,10 @@
#include <sys/syscall.h>
#include <asm/posix_types.h>
+#ifndef _MKNOD_VER
+# define _MKNOD_VER 0
+#endif
+
#ifndef INLINE_SYSCALL
#define INLINE_SYSCALL(name, nr, args...) __syscall_mknod (args)
#define __NR___syscall_mknod __NR_mknod
@@ -51,3 +55,8 @@ int __xmknod (int version, const char * path, __mode_t mode, __dev_t *dev)
}
}
+int mknod(const char *path, __mode_t mode, __dev_t dev)
+{
+ return __xmknod(_MKNOD_VER, path, mode, &dev);
+}
+