access.c 459 B

123456789101112131415161718192021
  1. /*
  2. * access() 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_faccessat && !defined __NR_access
  11. # include <fcntl.h>
  12. int access(const char *pathname, int mode)
  13. {
  14. return faccessat(AT_FDCWD, pathname, mode, 0);
  15. }
  16. #else
  17. _syscall2(int, access, const char *, pathname, int, mode)
  18. #endif