From 06753e25c994c797885c8e67b09ee57499c57bf0 Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Fri, 10 Apr 2009 13:32:23 +0000 Subject: [PATCH] -Put some fixes into the Sys-Virt perl bindings --- perl-Sys-Virt/Sys-Virt-fixes.patch | 18 ++++++++++++++++++ perl-Sys-Virt/Sys-Virt.spec | 2 ++ 2 files changed, 20 insertions(+) create mode 100644 perl-Sys-Virt/Sys-Virt-fixes.patch diff --git a/perl-Sys-Virt/Sys-Virt-fixes.patch b/perl-Sys-Virt/Sys-Virt-fixes.patch new file mode 100644 index 0000000..a958f90 --- /dev/null +++ b/perl-Sys-Virt/Sys-Virt-fixes.patch @@ -0,0 +1,18 @@ +--- Virt.xs 2009-03-27 15:45:33.000000000 -0400 ++++ /root/Virt.xs 2009-04-10 09:08:00.000000000 -0400 +@@ -1337,12 +1337,12 @@ + virDomainPtr dom; + virConnectPtr destcon; + unsigned long flags; +- const char *dname; +- const char *uri; ++ const char *dname = SvPOK($arg) ? (char *)SvPV_nolen($arg) : NULL; ++ const char *uri = SvPOK($arg) ? (char *)SvPV_nolen($arg) : NULL; + unsigned long bandwidth; + CODE: + if ((RETVAL = virDomainMigrate(dom, destcon, flags, dname, uri, bandwidth)) == NULL) { +- _croak_error(virConnGetLastError(virDomainGetConnect(dom))); ++ _croak_error(virGetLastError()); + } + OUTPUT: + RETVAL diff --git a/perl-Sys-Virt/Sys-Virt.spec b/perl-Sys-Virt/Sys-Virt.spec index 4546701..2672968 100644 --- a/perl-Sys-Virt/Sys-Virt.spec +++ b/perl-Sys-Virt/Sys-Virt.spec @@ -24,6 +24,7 @@ buildroot: %{_tmppath}/%{name}-%{version}-%(id -u -n) buildarch: x86_64 prefix: %(echo %{_prefix}) source: Sys-Virt-0.2.0.tar.gz +patch: Sys-Virt-fixes.patch %description The Sys::Virt module provides a Perl XS binding to the libvirt @@ -39,6 +40,7 @@ a consistent API. %prep %setup -q -n %{pkgname}-%{version} +%patch chmod -R u+w %{_builddir}/%{pkgname}-%{version} %build