]> xenbits.xensource.com Git - libvirt.git/commitdiff
Work around 'virGetVersion' build problem
authorJim Meyering <meyering@redhat.com>
Tue, 17 Feb 2009 10:33:41 +0000 (10:33 +0000)
committerJim Meyering <meyering@redhat.com>
Tue, 17 Feb 2009 10:33:41 +0000 (10:33 +0000)
The 'getVer' fix introducted in d88d459d [Allow remote://hostname/
style URIs for automatic driver probe...] breaks compiling libvirt
with loadable module support.  Work around this to get it building again.

Signed-off-by: Maximilian Wilhelm <max@rfc2324.org>
ChangeLog
src/libvirt.c

index eb7902398a8fceb4fe17ac95e58a116078905126..967e5c985150fe882c6e0e389f1b4ec81262c4e2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+Tue Feb 17 11:30:23 +0100 2009 Maximilian Wilhelm <max@rfc2324.org>
+
+       Work around 'virGetVersion' build problem
+       The 'getVer' fix introducted in 02a72b42 [Allow remote://hostname/
+       style URIs for automatic driver probe...] breaks compiling libvirt
+       with loadable module support.  Work around this to get it building again.
+
 Tue Feb 17 11:25:22 +0100 2009 Jim Meyering <meyering@redhat.com>
 
        avoid compiler warning about unused parameter
index ae076d10875924887bcdc92e48465002189b6690..038a1ac4cf7b525f36c58763a0b9a48e72268f12 100644 (file)
@@ -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);
 }