mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-30 01:20:40 +00:00
20 lines
588 B
Diff
20 lines
588 B
Diff
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 */
|
|
|