--- /dev/null
+--- libvirt-0.4.6/src/libvirt.c.orig 2008-09-22 14:12:12.000000000 +0100
++++ libvirt-0.4.6/src/libvirt.c 2008-10-14 15:30:56.000000000 +0100
+@@ -540,6 +540,9 @@
+ return -1;
+ }
+
++ DEBUG ("registering %s as driver %d",
++ driver->name, virDriverTabCount);
++
+ virDriverTab[virDriverTabCount] = driver;
+ return virDriverTabCount++;
+ }
--- /dev/null
+--- libvirt-0.4.6/src/libvirt.c.orig 2008-10-14 15:33:00.000000000 +0100
++++ libvirt-0.4.6/src/libvirt.c 2008-10-14 15:48:54.000000000 +0100
+@@ -297,10 +297,10 @@
+ if (lxcRegister() == -1) return -1;
+ #endif
+ if (storageRegister() == -1) return -1;
++#endif
+ #ifdef WITH_REMOTE
+ if (remoteRegister () == -1) return -1;
+ #endif
+-#endif
+
+ return(0);
+ }
Name: mingw32-libvirt
Version: 0.4.6
-Release: 4%{?dist}%{?extra_release}
+Release: 6%{?dist}%{?extra_release}
Summary: MinGW Windows libvirt virtualization library
License: LGPLv2+
Source0: ftp://libvirt.org/libvirt/libvirt-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+Patch0: mingw32-libvirt-0.4.6-debug-registration.patch
+Patch1: mingw32-libvirt-0.4.6-register-remote.patch
+
BuildRequires: mingw32-filesystem >= 23
BuildRequires: mingw32-gcc
BuildRequires: mingw32-binutils
BuildRequires: mingw32-gnutls
BuildRequires: mingw32-gettext
BuildRequires: mingw32-libxml2
-BuildRequires: mingw32-portablexdr
+# Portable XDR <= 4.0.10 contains a serious endianness bug on Windows.
+BuildRequires: mingw32-portablexdr >= 4.0.11
BuildRequires: mingw32-readline
BuildRequires: pkgconfig
# Need native version for msgfmt
%prep
%setup -q -n libvirt-%{version}
+%patch0 -p1
+%patch1 -p1
%build
%changelog
+* Wed Oct 15 2008 Richard Jones <rjones@redhat.com> - 0.4.6-6
+- Add patches from
+ https://www.redhat.com/archives/libvir-list/2008-October/msg00328.html
+- BR mingw32-portablexdr >= 4.0.11 to fix serious Windows endianness bug.
+
* Tue Oct 14 2008 Richard Jones <rjones@redhat.com> - 0.4.6-4
- +BR mingw32-readline.