提交 8c4faa90 编写于 作者: J Jim Fehlig

libxl: fix build with Xen4.3

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.
(cherry picked from commit 43b0ff5b)
上级 233a616b
......@@ -696,10 +696,22 @@ libxlVmReap(libxlDriverPrivatePtr driver,
}
/*
* Handle previously registered event notification from libxenlight
* Handle previously registered event notification from libxenlight.
*
* Note: Xen 4.3 removed the const from the event handler signature.
* Detect which signature to use based on
* LIBXL_HAVE_NONCONST_EVENT_OCCURS_EVENT_ARG.
*/
#ifdef LIBXL_HAVE_NONCONST_EVENT_OCCURS_EVENT_ARG
# define VIR_LIBXL_EVENT_CONST /* empty */
#else
# define VIR_LIBXL_EVENT_CONST const
#endif
static void
libxlEventHandler(void *data ATTRIBUTE_UNUSED, const libxl_event *event)
libxlEventHandler(void *data ATTRIBUTE_UNUSED,
VIR_LIBXL_EVENT_CONST libxl_event *event)
{
libxlDriverPrivatePtr driver = libxl_driver;
virDomainObjPtr vm = NULL;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册