statfix64.h 974 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #ifndef STATFIX_H
  2. #define STATFIX_H
  3. #include <features.h>
  4. #define _FILE_OFFSET_BITS 64
  5. #define __USE_FILE_OFFSET64
  6. #define __USE_LARGEFILE64
  7. #ifdef __UCLIBC_HAVE_LFS__
  8. #include <sys/types.h>
  9. /* Pull in whatever this particular arch's kernel thinks the kernel version of
  10. * struct stat should look like. It turns out that each arch has a different
  11. * opinion on the subject, and different kernel revs use different names... */
  12. #define stat kernel_stat
  13. #define new_stat kernel_stat
  14. #define stat64 kernel_stat64
  15. #define new_stat64 kernel_stat64
  16. #include <asm/stat.h>
  17. #undef new_stat64
  18. #undef stat64
  19. #undef new_stat
  20. #undef stat
  21. /* Now pull in libc's version of stat */
  22. #define stat libc_stat
  23. #define stat64 libc_stat64
  24. #include <sys/stat.h>
  25. #undef stat64
  26. #undef stat
  27. extern void statfix64(struct libc_stat64 *libcstat, struct kernel_stat64 *kstat);
  28. extern int __fxstat64(int version, int fd, struct libc_stat64 * statbuf);
  29. #endif /* __UCLIBC_HAVE_LFS__ */
  30. #endif