statfix.h 768 B

12345678910111213141516171819202122232425262728
  1. #ifndef STATFIX_H
  2. #define STATFIX_H
  3. #include <features.h>
  4. #undef __OPTIMIZE__
  5. #include <sys/types.h>
  6. /* Pull in whatever this particular arch's kernel thinks the kernel version of
  7. * * struct stat should look like. It turns out that each arch has a different
  8. * * opinion on the subject, and different kernel revs use different names... */
  9. #define stat kernel_stat
  10. #define new_stat kernel_stat
  11. #include <asm/stat.h>
  12. #undef new_stat
  13. #undef stat
  14. /* Now pull in libc's version of stat */
  15. #define stat libc_stat
  16. #define stat64 libc_stat64
  17. #define _SYS_STAT_H
  18. #include <bits/stat.h>
  19. #undef stat64
  20. #undef stat
  21. extern void __statfix(struct libc_stat *libcstat, struct kernel_stat *kstat);
  22. extern int __fxstat(int version, int fd, struct libc_stat * statbuf);
  23. #endif