libguestfs/SOURCES/0006-ocaml-Change-calls-to-caml_named_value-to-cope-with-.patch

33 lines
1019 B
Diff

From 96462b30d5ca6e45601512609cedfc874739137d Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Thu, 5 Sep 2019 09:00:14 +0100
Subject: [PATCH] ocaml: Change calls to caml_named_value() to cope with const
value* return.
In OCaml >= 4.09 the return value pointer of caml_named_value is
declared const.
Based on Pino Toscano's original patch to ocaml-augeas.
(cherry picked from commit 74ce7332dbb9bab2a69737257f0d07c93eb9bab4)
---
generator/daemon.ml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/generator/daemon.ml b/generator/daemon.ml
index a4e136aaa..b67c4d20b 100644
--- a/generator/daemon.ml
+++ b/generator/daemon.ml
@@ -746,7 +746,7 @@ let generate_daemon_caml_stubs () =
let nr_args = List.length args_do_function in
pr "{\n";
- pr " static value *cb = NULL;\n";
+ pr " static const value *cb = NULL;\n";
pr " CAMLparam0 ();\n";
pr " CAMLlocal2 (v, retv);\n";
pr " CAMLlocalN (args, %d);\n"
--
2.18.4