[libvirt] [PATCH 4/4] Workarounded 'virGetVersion' build problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



  The 'getVer' fix introducted in 02a72b420670718640d9abf0e07f2b1cca7b4d2b
  breaks compiling libvirt with loadable module support.
  Work around this to get it building again.

Signed-off-by: Maximilian Wilhelm <max@xxxxxxxxxxx>
---
 src/libvirt.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/src/libvirt.c b/src/libvirt.c
index ae076d1..038a1ac 100644
--- a/src/libvirt.c
+++ b/src/libvirt.c
@@ -803,7 +803,13 @@ virGetVersion(unsigned long *libVer, const char *type,
     if (typeVer != NULL) {
         if (type == NULL)
             type = "Xen";
+
+/* FIXME: Add _proper_ type version handling for loadable driver modules... */
+#ifdef WITH_DRIVER_MODULES
+        *typeVer = LIBVIR_VERSION_NUMBER;
+#else
         *typeVer = 0;
+
 #if WITH_XEN
         if (STRCASEEQ(type, "Xen"))
             *typeVer = xenUnifiedVersion();
@@ -836,6 +842,7 @@ virGetVersion(unsigned long *libVer, const char *type,
             virLibConnError(NULL, VIR_ERR_NO_SUPPORT, type);
             return (-1);
         }
+#endif /* WITH_DRIVER_MODULES */
     }
     return (0);
 }
-- 
1.5.6.5

--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]