ocaml/ocaml-3.10.1-map32bit.patch
2008-05-08 11:18:50 +00:00

24 lines
805 B
Diff

diff -ur ocaml-3.10.1.orig/byterun/unix.c ocaml-3.10.1/byterun/unix.c
--- ocaml-3.10.1.orig/byterun/unix.c 2007-11-20 15:47:41.000000000 +0000
+++ ocaml-3.10.1/byterun/unix.c 2008-05-08 11:54:11.000000000 +0100
@@ -346,6 +346,10 @@
#include <sys/mman.h>
+#ifndef MAP_32BIT /* Fedora bug 445545 */
+#define MAP_32BIT 0
+#endif
+
char *caml_aligned_mmap (asize_t size, int modulo, void **block)
{
char *raw_mem;
@@ -354,7 +358,7 @@
Assert (modulo < Page_size);
raw_mem = (char *) mmap(last_addr, size + Page_size, PROT_READ | PROT_WRITE,
- MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
+ MAP_32BIT | MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
if (raw_mem == MAP_FAILED) return NULL;
last_addr = raw_mem + size + 2 * Page_size;
*block = raw_mem;