[ocaml-libvirt] Fix int types.

Richard W.M. Jones rjones at fedoraproject.org
Sat Aug 30 18:12:01 UTC 2014


commit 6a19eca3dc7cdc737dc1a1b683fc86e9978ccb63
Author: Richard W.M. Jones <rjones at redhat.com>
Date:   Sat Aug 30 19:11:56 2014 +0100

    Fix int types.

 ...ndard-int64_t-instead-of-OCaml-defined-an.patch |   35 ++++++++++++++++++++
 ocaml-libvirt.spec                                 |   10 ++++-
 2 files changed, 43 insertions(+), 2 deletions(-)
---
diff --git a/0001-Use-C99-standard-int64_t-instead-of-OCaml-defined-an.patch b/0001-Use-C99-standard-int64_t-instead-of-OCaml-defined-an.patch
new file mode 100644
index 0000000..c00a75a
--- /dev/null
+++ b/0001-Use-C99-standard-int64_t-instead-of-OCaml-defined-an.patch
@@ -0,0 +1,35 @@
+From 21ac993da0a187821e812fe7b5b31a426121a546 Mon Sep 17 00:00:00 2001
+From: "Richard W.M. Jones" <rjones at redhat.com>
+Date: Sat, 30 Aug 2014 19:10:19 +0100
+Subject: [PATCH] Use C99 standard int64_t instead of OCaml defined (and soon
+ to go) int64.
+
+---
+ 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 3bb572f..06b3852 100644
+--- a/libvirt/libvirt_c_oneoffs.c
++++ b/libvirt/libvirt_c_oneoffs.c
+@@ -140,7 +140,7 @@ ocaml_libvirt_connect_node_get_free_memory (value connv)
+   NONBLOCKING (r = virNodeGetFreeMemory (conn));
+   CHECK_ERROR (r == 0, conn, "virNodeGetFreeMemory");
+ 
+-  rv = caml_copy_int64 ((int64) r);
++  rv = caml_copy_int64 ((int64_t) r);
+   CAMLreturn (rv);
+ }
+ 
+@@ -161,7 +161,7 @@ ocaml_libvirt_connect_node_get_cells_free_memory (value connv,
+ 
+   rv = caml_alloc (r, 0);
+   for (i = 0; i < r; ++i) {
+-    iv = caml_copy_int64 ((int64) freemems[i]);
++    iv = caml_copy_int64 ((int64_t) freemems[i]);
+     Store_field (rv, i, iv);
+   }
+ 
+-- 
+2.0.4
+
diff --git a/ocaml-libvirt.spec b/ocaml-libvirt.spec
index 4abc8fe..b2b708c 100644
--- a/ocaml-libvirt.spec
+++ b/ocaml-libvirt.spec
@@ -2,13 +2,16 @@
 
 Name:           ocaml-libvirt
 Version:        0.6.1.4
-Release:        2%{?dist}
+Release:        3%{?dist}
 Summary:        OCaml binding for libvirt
 License:        LGPLv2+
 
 URL:            http://libvirt.org/ocaml/
 Source0:        http://libvirt.org/sources/ocaml/%{name}-%{version}.tar.gz
 
+# Upstream patch to fix int types.
+Patch1:         0001-Use-C99-standard-int64_t-instead-of-OCaml-defined-an.patch
+
 ExcludeArch:    sparc64 s390 s390x
 
 BuildRequires:  ocaml >= 3.10.0
@@ -37,6 +40,8 @@ developing applications that use %{name}.
 %prep
 %setup -q
 
+%patch1 -p1
+
 
 %build
 %configure
@@ -83,8 +88,9 @@ make install-byte
 
 
 %changelog
-* Sat Aug 30 2014 Richard W.M. Jones <rjones at redhat.com> - 0.6.1.4-2
+* Sat Aug 30 2014 Richard W.M. Jones <rjones at redhat.com> - 0.6.1.4-3
 - ocaml-4.02.0 final rebuild.
+- Fix int types.
 
 * Mon Aug 25 2014 Richard W.M. Jones <rjones at redhat.com> - 0.6.1.4-1
 - New upstream version 0.6.1.4.


More information about the scm-commits mailing list