pipe.c 445 B

12345678910111213141516171819202122
  1. /*
  2. * pipe() for uClibc
  3. *
  4. * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
  5. *
  6. * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  7. */
  8. #include <sys/syscall.h>
  9. #include <unistd.h>
  10. #if defined __NR_pipe2 && !defined __NR_pipe
  11. int pipe(int filedes[2])
  12. {
  13. return pipe2(filedes, 0);
  14. }
  15. /* If both are defined then use the pipe syscall */
  16. #else
  17. _syscall1(int, pipe, int *, filedes)
  18. #endif
  19. libc_hidden_def(pipe)