From: Rich Felker Date: Mon, 23 Jul 2012 20:32:49 +0000 (-0400) Subject: add pipe2 syscall X-Git-Tag: v0.9.3~12 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=42f0e965c42d7611e7a02718bffb1a8ffba74488;p=oweals%2Fmusl.git add pipe2 syscall based on patch by orc and Isaac Dunham, with some details fixed. --- diff --git a/include/unistd.h b/include/unistd.h index 9c737f7c..17fe5e7c 100644 --- a/include/unistd.h +++ b/include/unistd.h @@ -174,6 +174,7 @@ int setresgid(gid_t, gid_t, gid_t); int getresuid(uid_t *, uid_t *, uid_t *); int getresgid(gid_t *, gid_t *, gid_t *); char *get_current_dir_name(void); +int pipe2(int [2], int); #endif #if defined(_LARGEFILE64_SOURCE) || defined(_GNU_SOURCE) 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 +#include "syscall.h" + +int pipe2(int fd[2], int flg) +{ + return syscall(SYS_pipe2, fd, flg); +}