From dde074b3905cce833e1cdca591174454e046083e Mon Sep 17 00:00:00 2001 From: Markos Chandras Date: Wed, 10 Oct 2012 16:24:43 +0100 Subject: pipe: Use pipe2 if arch does not have the pipe syscall Signed-off-by: Markos Chandras Signed-off-by: Bernhard Reutner-Fischer --- libc/sysdeps/linux/common/pipe.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'libc/sysdeps/linux/common/pipe.c') diff --git a/libc/sysdeps/linux/common/pipe.c b/libc/sysdeps/linux/common/pipe.c index 8eae27ca4..bd3929781 100644 --- a/libc/sysdeps/linux/common/pipe.c +++ b/libc/sysdeps/linux/common/pipe.c @@ -11,5 +11,13 @@ #include +#if defined __NR_pipe2 && !defined __NR_pipe +int pipe(int filedes[2]) +{ + return pipe2(filedes, 0); +} +/* If both are defined then use the pipe syscall */ +#else _syscall1(int, pipe, int *, filedes) +#endif libc_hidden_def(pipe) -- cgit v1.2.3