diff --git a/ocaml-3.10.0-map32bit.patch b/ocaml-3.10.0-map32bit.patch new file mode 100644 index 0000000..565df2a --- /dev/null +++ b/ocaml-3.10.0-map32bit.patch @@ -0,0 +1,23 @@ +diff -ur ocaml-3.10.0.orig/byterun/unix.c ocaml-3.10.0/byterun/unix.c +--- ocaml-3.10.0.orig/byterun/unix.c 2007-02-12 07:57:25.000000000 +0000 ++++ ocaml-3.10.0/byterun/unix.c 2008-07-13 21:44:06.000000000 +0100 +@@ -346,13 +346,17 @@ + + #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; + uintnat aligned_mem; + Assert (modulo < Page_size); + raw_mem = (char *) mmap(NULL, 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; + *block = raw_mem; + raw_mem += modulo; /* Address to be aligned */ +Only in ocaml-3.10.0/byterun: unix.c.orig diff --git a/ocaml.spec b/ocaml.spec index 42c46e5..c0dea96 100644 --- a/ocaml.spec +++ b/ocaml.spec @@ -1,6 +1,6 @@ Name: ocaml Version: 3.10.0 -Release: 7%{?dist} +Release: 8%{?dist} Summary: Objective Caml compiler and programming environment @@ -15,6 +15,7 @@ Source4: ocaml-find-requires.sh Source5: ocaml-find-provides.sh Patch0: ocaml-rpath.patch Patch1: ocaml-user-cflags.patch +Patch2: ocaml-3.10.0-map32bit.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: ncurses-devel BuildRequires: gdbm-devel @@ -186,6 +187,7 @@ man pages and info files. %setup -q -T -D -a 3 %patch0 -p1 %patch1 -p1 -b .cflags +%patch2 -p1 -b .map32bit cp %{SOURCE2} refman.pdf @@ -427,6 +429,9 @@ fi %changelog +* Sun Jul 13 2008 Richard W.M. Jones - 3.10.0-8 +- Pass MAP_32BIT to mmap (bz #454384). + * Thu Sep 6 2007 Richard W.M. Jones - 3.10.0-7 - Run chrpath to delete rpaths used on some of the stublibs. - Ignore Parsetree module in dependency calculation.