fstatat64.c 595 B

12345678910111213141516171819202122232425262728293031
  1. /*
  2. * fstatat64() 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. #include "xstatconv.h"
  11. #ifdef __UCLIBC_HAS_LFS__
  12. #ifdef __NR_fstatat64
  13. int fstatat64(int fd, const char *file, struct stat64 *buf, int flag)
  14. {
  15. int ret;
  16. struct kernel_stat64 kbuf;
  17. ret = INLINE_SYSCALL(fstatat64, 4, fd, file, &kbuf, flag);
  18. if (ret == 0)
  19. __xstat64_conv(&kbuf, buf);
  20. return ret;
  21. }
  22. #else
  23. /* should add emulation with fstat64() and /proc/self/fd/ ... */
  24. #endif
  25. #endif