diff --git a/ocaml-3.10.1-map32bit.patch b/ocaml-3.10.1-map32bit.patch new file mode 100644 index 0000000..b702981 --- /dev/null +++ b/ocaml-3.10.1-map32bit.patch @@ -0,0 +1,23 @@ +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 + ++#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; diff --git a/ocaml.spec b/ocaml.spec index 28bbeb5..edb21f5 100644 --- a/ocaml.spec +++ b/ocaml.spec @@ -1,6 +1,6 @@ Name: ocaml Version: 3.10.2 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Objective Caml compiler and programming environment @@ -17,6 +17,7 @@ Patch0: ocaml-rpath.patch Patch1: ocaml-user-cflags.patch Patch2: ocaml-3.10.0-tclver.patch Patch3: ocaml-3.10.1-ppc64.patch +Patch4: ocaml-3.10.1-map32bit.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: ncurses-devel BuildRequires: gdbm-devel @@ -194,6 +195,7 @@ man pages and info files. %patch1 -p1 -b .cflags %patch2 -p1 -b .tclver %patch3 -p1 -b .ppc64 +%patch4 -p1 -b .map32bit cp %{SOURCE2} refman.pdf @@ -432,6 +434,9 @@ fi %changelog +* Thu May 8 2008 Richard W.M. Jones - 3.10.2-2 +- Pass MAP_32BIT to mmap (bz #445545). + * Mon Apr 21 2008 Richard W.M. Jones - 3.10.2-1 - New upstream version 3.10.2 for Fedora 10. - Cleaned up several rpmlint errors & warnings.