mrc0mmand / rpms / libguestfs

Forked from rpms/libguestfs 3 years ago
Clone

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

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