musl-MAP_SYNC-fix.patch 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. --- a/configure
  2. +++ b/configure
  3. @@ -14507,8 +14507,7 @@
  4. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  5. /* end confdefs.h. */
  6. -#include <asm-generic/mman.h>
  7. -#include <asm-generic/mman-common.h>
  8. +#include <asm/mman.h>
  9. int
  10. main ()
  11. --- a/include/linux.h
  12. +++ b/include/linux.h
  13. @@ -327,12 +327,4 @@
  14. #define HAVE_GETFSMAP
  15. #endif /* HAVE_GETFSMAP */
  16. -#ifndef HAVE_MAP_SYNC
  17. -#define MAP_SYNC 0
  18. -#define MAP_SHARED_VALIDATE 0
  19. -#else
  20. -#include <asm-generic/mman.h>
  21. -#include <asm-generic/mman-common.h>
  22. -#endif /* HAVE_MAP_SYNC */
  23. -
  24. #endif /* __XFS_LINUX_H__ */
  25. --- a/io/mmap.c
  26. +++ b/io/mmap.c
  27. @@ -23,6 +23,11 @@
  28. #include "init.h"
  29. #include "io.h"
  30. +#ifndef HAVE_MAP_SYNC
  31. +#define MAP_SYNC 0
  32. +#define MAP_SHARED_VALIDATE 0
  33. +#endif
  34. +
  35. static cmdinfo_t mmap_cmd;
  36. static cmdinfo_t mread_cmd;
  37. static cmdinfo_t msync_cmd;
  38. --- a/m4/package_libcdev.m4
  39. +++ b/m4/package_libcdev.m4
  40. @@ -335,8 +335,7 @@
  41. AC_DEFUN([AC_HAVE_MAP_SYNC],
  42. [ AC_MSG_CHECKING([for MAP_SYNC])
  43. AC_TRY_COMPILE([
  44. -#include <asm-generic/mman.h>
  45. -#include <asm-generic/mman-common.h>
  46. +#include <asm/mman.h>
  47. ], [
  48. int flags = MAP_SYNC | MAP_SHARED_VALIDATE;
  49. ], have_map_sync=yes