Re: [Libvirt-announce] Libvirt 0.9.2 week freeze, RC2 available

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

 



2011/6/2 Daniel Veillard <veillard@xxxxxxxxxx>:
> ÂI just pushed a second release candidate
> Â Âftp://libvirt.org/libvirt/libvirt-0.9.2-rc2.tar.gz
> with corresponding rpm builds, this includes the extrenal lock support.
>
> On Wed, Jun 01, 2011 at 12:49:52PM +0200, Ruben Kerkhof wrote:
>> On Wed, Jun 1, 2011 at 10:31, Matthias Bolte
>> <matthias.bolte@xxxxxxxxxxxxxx> wrote:
>> > Works on Ubuntu 10.04, Windows (MinGW) and FreeBSD.
>> >
>> > Matthias
>>
>> Works on OSX 10.7.0, tested with VirtualBox 4.08
>
> ÂExcellent news, thanks !
> I hope we didn't introduced regressions in portability with the latest
> API additions ! If people could also try -rc2 it would be great too,
>
> Âthanks !
>
> Daniel
>

RC2 is broken on MinGW due to the lock manager using dlopen
unconditional. The attached patch fixes it.

Still works on FreeBSD and Ubuntu 10.04.

Matthias
From c734e683c4d9bbb5a87fba3e0008ce8000b62fe5 Mon Sep 17 00:00:00 2001
From: Matthias Bolte <matthias.bolte@xxxxxxxxxxxxxx>
Date: Fri, 3 Jun 2011 10:20:49 +0200
Subject: [PATCH] Make dlopen usage in lock manager conditional

This fixes build failure on MinGW, due to MinGW not supporting dlopen.
---
 src/locking/lock_manager.c |   20 +++++++++++++++++++-
 1 files changed, 19 insertions(+), 1 deletions(-)

diff --git a/src/locking/lock_manager.c b/src/locking/lock_manager.c
index 6197fd4..6293e6d 100644
--- a/src/locking/lock_manager.c
+++ b/src/locking/lock_manager.c
@@ -29,7 +29,9 @@
 #include "memory.h"
 #include "uuid.h"
 
-#include <dlfcn.h>
+#if HAVE_DLFCN_H
+# include <dlfcn.h>
+#endif
 #include <stdlib.h>
 #include <unistd.h>
 
@@ -115,6 +117,7 @@ static void virLockManagerLogParams(size_t nparams,
  *
  * Returns a plugin object, or NULL if loading failed.
  */
+#if HAVE_DLFCN_H
 virLockManagerPluginPtr virLockManagerPluginNew(const char *name,
                                                 unsigned int flags)
 {
@@ -187,6 +190,15 @@ cleanup:
         dlclose(handle);
     return NULL;
 }
+#else /* !HAVE_DLFCN_H */
+virLockManagerPluginPtr virLockManagerPluginNew(const char *name ATTRIBUTE_UNUSED,
+                                                unsigned int flags ATTRIBUTE_UNUSED)
+{
+    virLockError(VIR_ERR_INTERNAL_ERROR, "%s",
+                 _("this platform is missing dlopen"));
+    return NULL;
+}
+#endif /* !HAVE_DLFCN_H */
 
 
 /**
@@ -211,6 +223,7 @@ void virLockManagerPluginRef(virLockManagerPluginPtr plugin)
  * result in an unsafe scenario.
  *
  */
+#if HAVE_DLFCN_H
 void virLockManagerPluginUnref(virLockManagerPluginPtr plugin)
 {
     if (!plugin)
@@ -232,6 +245,11 @@ void virLockManagerPluginUnref(virLockManagerPluginPtr plugin)
     VIR_FREE(plugin->name);
     VIR_FREE(plugin);
 }
+#else /* !HAVE_DLFCN_H */
+void virLockManagerPluginUnref(virLockManagerPluginPtr plugin ATTRIBUTE_UNUSED)
+{
+}
+#endif /* !HAVE_DLFCN_H */
 
 
 const char *virLockManagerPluginGetName(virLockManagerPluginPtr plugin)
-- 
1.7.0.4

--
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]