openat64.c 485 B

123456789101112131415161718192021
  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 <_lfs_64.h>
  9. #include <sys/syscall.h>
  10. #include <fcntl.h>
  11. #ifdef __NR_openat
  12. static int __openat64(int fd, const char *file, int oflag, mode_t mode)
  13. {
  14. return openat(fd, file, oflag | O_LARGEFILE, mode);
  15. }
  16. strong_alias_untyped(__openat64,openat64)
  17. #else
  18. /* should add emulation with open() and /proc/self/fd/ ... */
  19. #endif