[mingw-libvirt: 18/22] Workaround compile failure against mingw-w64 trunk

Kalev Lember kalev at fedoraproject.org
Wed Mar 7 15:41:15 UTC 2012


commit b07d4b1e9d229920162c054e1930cb1f199e8f3a
Author: Erik van Pienbroek <epienbro at fedoraproject.org>
Date:   Tue Feb 28 03:10:51 2012 +0100

    Workaround compile failure against mingw-w64 trunk

 ...ulib-workaround-mingw-w64-vfscanf-failure.patch |   11 +++++++++++
 mingw32-libvirt.spec                               |    9 +++++++++
 2 files changed, 20 insertions(+), 0 deletions(-)
---
diff --git a/libvirt-gnulib-workaround-mingw-w64-vfscanf-failure.patch b/libvirt-gnulib-workaround-mingw-w64-vfscanf-failure.patch
new file mode 100644
index 0000000..3680ebe
--- /dev/null
+++ b/libvirt-gnulib-workaround-mingw-w64-vfscanf-failure.patch
@@ -0,0 +1,11 @@
+--- gnulib/lib/stdio-read.c.orig	2012-01-27 16:50:16.343213983 +0100
++++ gnulib/lib/stdio-read.c	2012-01-27 17:04:42.351546942 +0100
+@@ -19,6 +19,8 @@
+ 
+ #include <config.h>
+ 
++#define __NO_ISOCEXT 1
++
+ /* Specification.  */
+ #include <stdio.h>
+ 
diff --git a/mingw32-libvirt.spec b/mingw32-libvirt.spec
index 6f7573a..89d5182 100644
--- a/mingw32-libvirt.spec
+++ b/mingw32-libvirt.spec
@@ -37,6 +37,13 @@ URL:            http://libvirt.org/
 Source0:        ftp://libvirt.org/libvirt/libvirt-%{version}.tar.gz
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
+# Mingw-w64 trunk (jan 27 2012) contains an inline implementation of the
+# vscanf and vfscanf functions in stdio.h. This break compilation of gnulib
+# which tries to provide its own implementation for the vscanf and vfscanf
+# functions. Workaround is by making sure that the inline implementation
+# isn't triggered by #include <stdio.h>
+Patch0:         libvirt-gnulib-workaround-mingw-w64-vfscanf-failure.patch
+
 BuildRequires:  mingw32-filesystem >= 23
 BuildRequires:  mingw32-gcc
 BuildRequires:  mingw32-binutils
@@ -73,6 +80,7 @@ MinGW Windows libvirt virtualization library.
 
 %prep
 %setup -q -n libvirt-%{version}
+%patch0 -p0
 
 
 %build
@@ -191,6 +199,7 @@ rm -rf $RPM_BUILD_ROOT
 %changelog
 * Tue Feb 28 2012 Erik van Pienbroek <epienbro at fedoraproject.org> - 0.9.10-2
 - Rebuild against the mingw-w64 toolchain
+- Workaround compile failure against mingw-w64 trunk
 
 * Mon Feb 20 2012 Daniel P. Berrange <berrange at redhat.com> - 0.9.10-1
 - Update to 0.9.10 release


More information about the scm-commits mailing list