Add upstream const-correctness build fix.
This commit is contained in:
parent
51de522a5f
commit
95e14d5ebe
@ -1,7 +1,7 @@
|
||||
From 56c0602e972f1fae336198eb9587d71f1e36daff Mon Sep 17 00:00:00 2001
|
||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||
Date: Tue, 20 Aug 2019 15:06:57 +0100
|
||||
Subject: [PATCH] Use ocamlopt -g option.
|
||||
Subject: [PATCH 1/2] Use ocamlopt -g option.
|
||||
|
||||
Originally from Fedora.
|
||||
---
|
||||
@ -24,5 +24,5 @@ index e01385f..4ae5ef5 100644
|
||||
OCAMLDOCFLAGS = -html -sort
|
||||
|
||||
--
|
||||
2.22.0
|
||||
2.23.0
|
||||
|
||||
|
@ -0,0 +1,35 @@
|
||||
From 1cf5aef99b26a46529ca797547c0b49627fffe78 Mon Sep 17 00:00:00 2001
|
||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||
Date: Sat, 7 Dec 2019 11:08:54 +0000
|
||||
Subject: [PATCH 2/2] caml_named_value returns const value pointer in OCaml
|
||||
4.09+
|
||||
|
||||
---
|
||||
augeas-c.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/augeas-c.c b/augeas-c.c
|
||||
index 9217017..679bcb5 100644
|
||||
--- a/augeas-c.c
|
||||
+++ b/augeas-c.c
|
||||
@@ -86,7 +86,7 @@ static const int error_map_len = sizeof error_map / sizeof error_map[0];
|
||||
static void
|
||||
raise_error_and_maybe_close (augeas_t t, const char *msg, bool close_handle)
|
||||
{
|
||||
- value *exn = caml_named_value ("Augeas.Error");
|
||||
+ const value *exn = caml_named_value ("Augeas.Error");
|
||||
value args[5];
|
||||
const int code = aug_error (t);
|
||||
const char *aug_err_msg;
|
||||
@@ -132,7 +132,7 @@ raise_error_and_maybe_close (augeas_t t, const char *msg, bool close_handle)
|
||||
static void
|
||||
raise_init_error (const char *msg)
|
||||
{
|
||||
- value *exn = caml_named_value ("Augeas.Error");
|
||||
+ const value *exn = caml_named_value ("Augeas.Error");
|
||||
value args[5];
|
||||
|
||||
args[0] = caml_alloc (1, 0);
|
||||
--
|
||||
2.23.0
|
||||
|
@ -11,6 +11,8 @@ Source0: http://people.redhat.com/~rjones/augeas/files/%{name}-%{version}
|
||||
|
||||
# Upstream patch to enable debuginfo.
|
||||
Patch1: 0001-Use-ocamlopt-g-option.patch
|
||||
# Const-correctness fix for OCaml 4.09+
|
||||
Patch2: 0002-caml_named_value-returns-const-value-pointer-in-OCam.patch
|
||||
|
||||
BuildRequires: ocaml >= 3.09.0
|
||||
BuildRequires: ocaml-findlib-devel
|
||||
@ -95,6 +97,7 @@ chrpath --delete $OCAMLFIND_DESTDIR/stublibs/dll*.so
|
||||
%changelog
|
||||
* Fri Dec 06 2019 Richard W.M. Jones <rjones@redhat.com> - 0.6-2
|
||||
- OCaml 4.09.0 (final) rebuild.
|
||||
- Add upstream const-correctness build fix.
|
||||
|
||||
* Tue Aug 20 2019 Richard W.M. Jones <rjones@redhat.com> - 0.6-1
|
||||
- New upstream version 0.6.
|
||||
|
Loading…
Reference in New Issue
Block a user