mkfifoat.c 403 B

12345678910111213141516171819
  1. /*
  2. * mkfifoat() for uClibc
  3. *
  4. * Copyright (C) 2009 Analog Devices Inc.
  5. *
  6. * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  7. */
  8. #include <sys/syscall.h>
  9. #include <sys/stat.h>
  10. #ifdef __NR_mknodat
  11. int mkfifoat(int fd, const char *path, mode_t mode)
  12. {
  13. return mknodat(fd, path, mode | S_IFIFO, 0);
  14. }
  15. #else
  16. /* should add emulation with mkfifo() and /proc/self/fd/ ... */
  17. #endif