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