scratchbox2-2.0-glibc-2.10.patch 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. diff --git a/preload/interface.master b/preload/interface.master
  2. index 55a9481..4ba22b2 100644
  3. --- a/preload/interface.master
  4. +++ b/preload/interface.master
  5. @@ -406,20 +406,34 @@ WRAP: int rmdir(const char *pathname) : \
  6. #ifdef HAVE_SCANDIR
  7. #ifdef HAVE_LINUX_SCANDIR
  8. +#if _POSIX_C_SOURCE == 200809L
  9. +WRAP: int scandir(const char *dir, struct dirent ***namelist, \
  10. + SCANDIR_TYPE_ARG3, \
  11. + int(*compar)(const struct dirent **, const struct dirent **)) : \
  12. + map(dir) hardcode_param(3,filter)
  13. +#else
  14. WRAP: int scandir(const char *dir, struct dirent ***namelist, \
  15. SCANDIR_TYPE_ARG3, int(*compar)(const void *, const void *)) : \
  16. map(dir) hardcode_param(3,filter)
  17. #endif
  18. +#endif
  19. #ifdef HAVE_OSX_SCANDIR
  20. WRAP: int scandir(const char *dirname, struct dirent ***namelist, int (*select)(struct dirent *), int (*compar)(const void *, const void *)): map(dirname)
  21. #endif
  22. #endif
  23. #ifdef HAVE_SCANDIR64
  24. +#if _POSIX_C_SOURCE == 200809L
  25. +WRAP: int scandir64(const char *dir, struct dirent64 ***namelist, \
  26. + int(*filter)(const struct dirent64 *), \
  27. + int(*compar)(const struct dirent64 **, const struct dirent64 **)) : \
  28. + map(dir)
  29. +#else
  30. WRAP: int scandir64(const char *dir, struct dirent64 ***namelist, \
  31. int(*filter)(const struct dirent64 *), \
  32. int(*compar)(const void *, const void *)) : \
  33. map(dir)
  34. #endif
  35. +#endif
  36. #ifdef HAVE_SETXATTR
  37. #ifdef HAVE_LINUX_XATTRS
  38. WRAP: int setxattr(const char *path, const char *name, const void *value, \