From 4187b53ff5504302df21f0cdc46f0aaebe9e1788 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 7 Nov 2016 17:09:09 +0000 Subject: [PATCH] - Small fix for OCaml 4.04.0 changes in Hp_val macro. --- ancient-0.9.0-use-header_t.patch | 20 ++++++++++++++++++++ ocaml-ancient.spec | 4 ++++ 2 files changed, 24 insertions(+) create mode 100644 ancient-0.9.0-use-header_t.patch diff --git a/ancient-0.9.0-use-header_t.patch b/ancient-0.9.0-use-header_t.patch new file mode 100644 index 0000000..f660631 --- /dev/null +++ b/ancient-0.9.0-use-header_t.patch @@ -0,0 +1,20 @@ +--- ancient-0.9.0.old/ancient_c.c 2009-05-26 12:45:26.000000000 +0100 ++++ ancient-0.9.0/ancient_c.c 2016-11-07 17:07:42.531413947 +0000 +@@ -169,7 +169,7 @@ + } + + struct restore_item { +- char *header; ++ header_t *header; + value field_zero; + }; + +@@ -203,7 +203,7 @@ + // which is already ancient. + assert (Is_in_heap_or_young (obj)); + +- char *header = Hp_val (obj); ++ header_t *header = Hp_val (obj); + + // If we've already visited this object, just return its offset + // in the out-of-heap memory. diff --git a/ocaml-ancient.spec b/ocaml-ancient.spec index 8ea9099..78b9d9e 100644 --- a/ocaml-ancient.spec +++ b/ocaml-ancient.spec @@ -15,6 +15,8 @@ URL: http://git.annexia.org/?p=ocaml-ancient.git;a=summary Source0: ancient-%{version}.tar.gz Patch1: ancient-0.9.0-use-ocamlopt-g.patch +# Use header_t with OCaml 4.04.0. +Patch2: ancient-0.9.0-use-header_t.patch BuildRequires: ocaml >= 3.10.0 BuildRequires: ocaml-findlib-devel @@ -56,6 +58,7 @@ developing applications that use %{name}. %setup -q -n ancient-%{version} %patch1 -p1 +%patch2 -p1 %build @@ -117,6 +120,7 @@ chrpath --delete $OCAMLFIND_DESTDIR/stublibs/dll*.so %changelog * Mon Nov 07 2016 Richard W.M. Jones - 0.9.0-28 - Rebuild for OCaml 4.04.0. +- Small fix for OCaml 4.04.0 changes in Hp_val macro. * Thu Feb 04 2016 Fedora Release Engineering - 0.9.0-27 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild