[libvirt] [PATCH 1/2] libxl: fix build with Xen4.3

Jim Fehlig jfehlig at suse.com
Thu May 16 16:01:49 UTC 2013


Xen 4.3 fixes a mistake in the libxl event handler signature where the
event owned by the application was defined as const.  Detect this and
define the libvirt libxl event handler signature appropriately.
---
 src/libxl/libxl_driver.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c
index b39e005..74e8331 100644
--- a/src/libxl/libxl_driver.c
+++ b/src/libxl/libxl_driver.c
@@ -700,7 +700,12 @@ libxlVmReap(libxlDriverPrivatePtr driver,
  * Handle previously registered event notification from libxenlight
  */
 static void
-libxlEventHandler(void *data ATTRIBUTE_UNUSED, const libxl_event *event)
+libxlEventHandler(void *data ATTRIBUTE_UNUSED,
+#ifdef LIBXL_HAVE_NONCONST_EVENT_OCCURS_EVENT_ARG
+                  libxl_event *event)
+#else
+                  const libxl_event *event)
+#endif
 {
     libxlDriverPrivatePtr driver = libxl_driver;
     virDomainObjPtr vm = NULL;
-- 
1.7.7




More information about the libvir-list mailing list