summaryrefslogtreecommitdiffstats
path: root/libc-top-half/musl/src/unistd/pipe.c
diff options
context:
space:
mode:
Diffstat (limited to 'libc-top-half/musl/src/unistd/pipe.c')
-rw-r--r--libc-top-half/musl/src/unistd/pipe.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/libc-top-half/musl/src/unistd/pipe.c b/libc-top-half/musl/src/unistd/pipe.c
new file mode 100644
index 0000000..d07b8d2
--- /dev/null
+++ b/libc-top-half/musl/src/unistd/pipe.c
@@ -0,0 +1,11 @@
+#include <unistd.h>
+#include "syscall.h"
+
+int pipe(int fd[2])
+{
+#ifdef SYS_pipe
+ return syscall(SYS_pipe, fd);
+#else
+ return syscall(SYS_pipe2, fd, 0);
+#endif
+}