diff options
-rw-r--r-- | include/unistd.h | 1 | ||||
-rw-r--r-- | src/linux/pipe2.c | 8 |
2 files changed, 9 insertions, 0 deletions
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 <unistd.h> +#include "syscall.h" + +int pipe2(int fd[2], int flg) +{ + return syscall(SYS_pipe2, fd, flg); +} |