libguestfs/SOURCES/0002-caml_named_value-returns-const-value-pointer-in-OCam.patch

37 lines
1.2 KiB
Diff

From 524b0c748a3a2d47b4c76e3aa546b9d4af144e6c 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] caml_named_value returns const value pointer in OCaml 4.09+
(cherry picked from ocaml-augeas
commit 1cf5aef99b26a46529ca797547c0b49627fffe78)
---
common/mlaugeas/augeas-c.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/common/mlaugeas/augeas-c.c b/common/mlaugeas/augeas-c.c
index 3e0ba67ba..3b1dc2551 100644
--- a/common/mlaugeas/augeas-c.c
+++ b/common/mlaugeas/augeas-c.c
@@ -77,7 +77,7 @@ static const int error_map_len = sizeof error_map / sizeof error_map[0];
static void
raise_error (augeas_t t, const char *msg)
{
- value *exn = caml_named_value ("Augeas.Error");
+ const value *exn = caml_named_value ("Augeas.Error");
value args[4];
const int code = aug_error (t);
const char *aug_err_minor;
@@ -113,7 +113,7 @@ raise_error (augeas_t t, const char *msg)
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[4];
args[0] = caml_alloc (1, 0);
--
2.18.4