Include upstream patch to fix build for OCaml 4.09.
This commit is contained in:
parent
7037aa34e7
commit
f127a9d979
38
0001-Make-const-the-return-value-of-caml_named_value.patch
Normal file
38
0001-Make-const-the-return-value-of-caml_named_value.patch
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
From 75b13978f85b32c7a121aa289d8ebf41ba14ee5a Mon Sep 17 00:00:00 2001
|
||||||
|
From: Pino Toscano <ptoscano@redhat.com>
|
||||||
|
Date: Thu, 5 Sep 2019 09:57:09 +0200
|
||||||
|
Subject: [PATCH] Make const the return value of caml_named_value()
|
||||||
|
|
||||||
|
With OCaml >= 4.09 caml_named_value() returns a const value *, so keep
|
||||||
|
the constness to build also in this case.
|
||||||
|
|
||||||
|
Signed-off-by: Pino Toscano <ptoscano@redhat.com>
|
||||||
|
---
|
||||||
|
libvirt/libvirt_c_oneoffs.c | 4 ++--
|
||||||
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/libvirt/libvirt_c_oneoffs.c b/libvirt/libvirt_c_oneoffs.c
|
||||||
|
index 6f56f10..e23c0db 100644
|
||||||
|
--- a/libvirt/libvirt_c_oneoffs.c
|
||||||
|
+++ b/libvirt/libvirt_c_oneoffs.c
|
||||||
|
@@ -1207,7 +1207,7 @@ ocaml_libvirt_event_run_default_impl (value unitv)
|
||||||
|
#define DOMAIN_CALLBACK_BEGIN(NAME) \
|
||||||
|
value connv, domv, callback_id, result; \
|
||||||
|
connv = domv = callback_id = result = Val_int(0); \
|
||||||
|
- static value *callback = NULL; \
|
||||||
|
+ static const value *callback = NULL; \
|
||||||
|
caml_leave_blocking_section(); \
|
||||||
|
if (callback == NULL) \
|
||||||
|
callback = caml_named_value(NAME); \
|
||||||
|
@@ -1433,7 +1433,7 @@ timeout_callback(int timer, void *opaque)
|
||||||
|
{
|
||||||
|
value callback_id, result;
|
||||||
|
callback_id = result = Val_int(0);
|
||||||
|
- static value *callback = NULL;
|
||||||
|
+ static const value *callback = NULL;
|
||||||
|
caml_leave_blocking_section();
|
||||||
|
if (callback == NULL)
|
||||||
|
callback = caml_named_value("Libvirt.timeout_callback");
|
||||||
|
--
|
||||||
|
2.23.0
|
||||||
|
|
@ -7,6 +7,10 @@ License: LGPLv2+
|
|||||||
URL: http://libvirt.org/ocaml/
|
URL: http://libvirt.org/ocaml/
|
||||||
Source0: http://libvirt.org/sources/ocaml/%{name}-%{version}.tar.gz
|
Source0: http://libvirt.org/sources/ocaml/%{name}-%{version}.tar.gz
|
||||||
|
|
||||||
|
# Fixes build with OCaml >= 4.09.
|
||||||
|
# Upstream commit 75b13978f85b32c7a121aa289d8ebf41ba14ee5a.
|
||||||
|
Patch1: 0001-Make-const-the-return-value-of-caml_named_value.patch
|
||||||
|
|
||||||
BuildRequires: ocaml >= 3.10.0
|
BuildRequires: ocaml >= 3.10.0
|
||||||
BuildRequires: ocaml-ocamldoc
|
BuildRequires: ocaml-ocamldoc
|
||||||
BuildRequires: ocaml-findlib-devel
|
BuildRequires: ocaml-findlib-devel
|
||||||
@ -81,7 +85,7 @@ make install-byte
|
|||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Fri Dec 06 2019 Richard W.M. Jones <rjones@redhat.com> - 0.6.1.5-3
|
* Fri Dec 06 2019 Richard W.M. Jones <rjones@redhat.com> - 0.6.1.5-3
|
||||||
- Bump release and rebuild.
|
- Include upstream patch to fix build for OCaml 4.09.
|
||||||
|
|
||||||
* Fri Dec 06 2019 Richard W.M. Jones <rjones@redhat.com> - 0.6.1.5-2
|
* Fri Dec 06 2019 Richard W.M. Jones <rjones@redhat.com> - 0.6.1.5-2
|
||||||
- OCaml 4.09.0 (final) rebuild.
|
- OCaml 4.09.0 (final) rebuild.
|
||||||
|
Loading…
Reference in New Issue
Block a user