openat.c 412 B

123456789101112131415161718
  1. /*
  2. * openat() 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. #define openat __xx_openat
  9. #include <sys/syscall.h>
  10. #include <fcntl.h>
  11. #undef openat
  12. #ifdef __NR_openat
  13. _syscall4(int, openat, int, fd, const char *, file, int, oflag, mode_t, mode)
  14. #else
  15. /* should add emulation with open() and /proc/self/fd/ ... */
  16. #endif