mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-26 23:55:23 +00:00
Fix compilation of legacy xen driver with Xen 4.2
In Xen 4.2, xs.h is deprecated in favor of xenstore.h. xs.h now
contains
#warning xs.h is deprecated use xenstore.h instead
#include <xenstore.h>
which fails compilation when warnings are treated as errors.
Introduce a configure-time check for xenstore.h and if found,
use it instead of xs.h.
(cherry picked from commit 416eca189b
)
This commit is contained in:
parent
440c15444a
commit
9875efbdc3
@ -768,6 +768,8 @@ if test "$with_xen" != "no" ; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if test "$with_xen" != "no" ; then
|
if test "$with_xen" != "no" ; then
|
||||||
|
dnl In Xen 4.2, xs.h is deprecated in favor of xenstore.h.
|
||||||
|
AC_CHECK_HEADERS([xenstore.h])
|
||||||
AC_CHECK_HEADERS([xen/xen.h xen/version.h xen/dom0_ops.h],,[
|
AC_CHECK_HEADERS([xen/xen.h xen/version.h xen/dom0_ops.h],,[
|
||||||
if test "$with_xen" = "yes"; then
|
if test "$with_xen" = "yes"; then
|
||||||
fail=1
|
fail=1
|
||||||
|
@ -32,7 +32,11 @@
|
|||||||
# include <unistd.h>
|
# include <unistd.h>
|
||||||
# include <regex.h>
|
# include <regex.h>
|
||||||
|
|
||||||
|
# if HAVE_XENSTORE_H
|
||||||
|
# include <xenstore.h>
|
||||||
|
# else
|
||||||
# include <xs.h>
|
# include <xs.h>
|
||||||
|
# endif
|
||||||
|
|
||||||
# include "virterror_internal.h"
|
# include "virterror_internal.h"
|
||||||
# include "datatypes.h"
|
# include "datatypes.h"
|
||||||
|
@ -35,7 +35,11 @@
|
|||||||
#include <xen/dom0_ops.h>
|
#include <xen/dom0_ops.h>
|
||||||
#include <xen/version.h>
|
#include <xen/version.h>
|
||||||
|
|
||||||
#include <xs.h>
|
#if HAVE_XENSTORE_H
|
||||||
|
# include <xenstore.h>
|
||||||
|
#else
|
||||||
|
# include <xs.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "virterror_internal.h"
|
#include "virterror_internal.h"
|
||||||
#include "datatypes.h"
|
#include "datatypes.h"
|
||||||
|
Loading…
Reference in New Issue
Block a user