blob: 0ee1b06c7346c3b7e8b58358b6ed8e2e1c585eab (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
diff --git a/rts/LinkerInternals.h b/rts/LinkerInternals.h
--- a/rts/LinkerInternals.h
+++ b/rts/LinkerInternals.h
@@ -303,4 +303,14 @@
# define OBJFORMAT_MACHO
#endif
+/* In order to simplify control flow a bit, some references to mmap-related
+ definitions are blocked off by a C-level if statement rather than a CPP-level
+ #if statement. Since those are dead branches when !RTS_LINKER_USE_MMAP, we
+ just stub out the relevant symbols here
+*/
+#if !RTS_LINKER_USE_MMAP
+#define munmap(x,y) /* nothing */
+#define MAP_ANONYMOUS 0
+#endif
+
#endif /* LINKERINTERNALS_H */
|