openat.c 512 B

12345678910111213141516171819
  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. #include <sys/syscall.h>
  9. #include <fcntl.h>
  10. #ifdef __NR_openat
  11. # define __NR___syscall_openat __NR_openat
  12. static __inline__ _syscall4(int, __syscall_openat, int, fd, const char *, file, int, oflag, mode_t, mode)
  13. strong_alias_untyped(__syscall_openat,openat)
  14. libc_hidden_def(openat)
  15. #else
  16. /* should add emulation with open() and /proc/self/fd/ ... */
  17. #endif