libguestfs/SOURCES/0008-builder-Fix-const-correctness-for-OCaml-4.10.patch

30 lines
860 B
Diff
Raw Normal View History

From 17df30b82007073a40deb37ff7f840d56a1b5bf1 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Thu, 6 Feb 2020 10:33:39 +0000
Subject: [PATCH] builder: Fix const correctness for OCaml 4.10.
String_val now returns a const char *.
(cherry picked from commit d6fcf519f2d860fe3167629f042f5ff6a4ccc40d)
---
builder/setlocale-c.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/builder/setlocale-c.c b/builder/setlocale-c.c
index f2ad85352..6d877e7ac 100644
--- a/builder/setlocale-c.c
+++ b/builder/setlocale-c.c
@@ -44,7 +44,8 @@ virt_builder_setlocale (value val_category, value val_name)
{
CAMLparam2 (val_category, val_name);
CAMLlocal2 (rv, rv2);
- char *ret, *locstring;
+ const char *locstring;
+ char *ret;
int category;
category = lc_string_table[Int_val (val_category)];
--
2.18.4