fix-mmap.patch 666 B

123456789101112131415161718192021222324252627282930313233
  1. diff --git a/io/mmap.c b/io/mmap.c
  2. index f9383e5..12f3fff 100644
  3. --- a/io/mmap.c
  4. +++ b/io/mmap.c
  5. @@ -4,10 +4,10 @@
  6. * All Rights Reserved.
  7. */
  8. -#include "command.h"
  9. -#include "input.h"
  10. #include <sys/mman.h>
  11. #include <signal.h>
  12. +#include "command.h"
  13. +#include "input.h"
  14. #include "init.h"
  15. #include "io.h"
  16. @@ -20,6 +20,14 @@ static cmdinfo_t mwrite_cmd;
  17. static cmdinfo_t mremap_cmd;
  18. #endif /* HAVE_MREMAP */
  19. +#ifndef HAVE_MAP_SYNC
  20. +#define MAP_SYNC 0
  21. +#define MAP_SHARED_VALIDATE 0
  22. +#else
  23. +#include <asm-generic/mman.h>
  24. +#include <asm-generic/mman-common.h>
  25. +#endif /* HAVE_MAP_SYNC */
  26. +
  27. mmap_region_t *maptable;
  28. int mapcount;
  29. mmap_region_t *mapping;