summaryrefslogtreecommitdiff
path: root/userland/libc/unistd/dup.c
diff options
context:
space:
mode:
Diffstat (limited to 'userland/libc/unistd/dup.c')
-rw-r--r--userland/libc/unistd/dup.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/userland/libc/unistd/dup.c b/userland/libc/unistd/dup.c
new file mode 100644
index 0000000..176659b
--- /dev/null
+++ b/userland/libc/unistd/dup.c
@@ -0,0 +1,6 @@
+#include <syscall.h>
+#include <unistd.h>
+
+int dup(int fildes) {
+ RC_ERRNO(syscall(SYS_DUP, (u32)fildes, 0, 0, 0, 0));
+}