summaryrefslogtreecommitdiff
path: root/src/linux/pipe2.c
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2012-07-23 16:32:49 -0400
committerRich Felker <dalias@aerifal.cx>2012-07-23 16:32:49 -0400
commit42f0e965c42d7611e7a02718bffb1a8ffba74488 (patch)
tree7f56c41bc1d0067828c7f318b9be5cca3acf7cad /src/linux/pipe2.c
parent845a5e69fa33bf49eea81a7b8c80902ab1687f2e (diff)
downloadmusl-42f0e965c42d7611e7a02718bffb1a8ffba74488.tar.gz
musl-42f0e965c42d7611e7a02718bffb1a8ffba74488.tar.bz2
musl-42f0e965c42d7611e7a02718bffb1a8ffba74488.tar.xz
musl-42f0e965c42d7611e7a02718bffb1a8ffba74488.zip
add pipe2 syscall
based on patch by orc and Isaac Dunham, with some details fixed.
Diffstat (limited to 'src/linux/pipe2.c')
-rw-r--r--src/linux/pipe2.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/linux/pipe2.c b/src/linux/pipe2.c
new file mode 100644
index 00000000..83282bb9
--- /dev/null
+++ b/src/linux/pipe2.c
@@ -0,0 +1,8 @@
+#define _GNU_SOURCE
+#include <unistd.h>
+#include "syscall.h"
+
+int pipe2(int fd[2], int flg)
+{
+ return syscall(SYS_pipe2, fd, flg);
+}