mrc0mmand / rpms / libguestfs

Forked from rpms/libguestfs 3 years ago
Clone

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

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