提交 fff0ce11 编写于 作者: J Jim Fehlig 提交者: Eric Blake

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 416eca18)
上级 2f450cf2
......@@ -691,6 +691,8 @@ if test "$with_xen" != "no" ; then
fi
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],,[
if test "$with_xen" = "yes"; then
fail=1
......
......@@ -20,7 +20,11 @@
# include <unistd.h>
# include <regex.h>
# include <xs.h>
# if HAVE_XENSTORE_H
# include <xenstore.h>
# else
# include <xs.h>
# endif
# include "virterror_internal.h"
# include "datatypes.h"
......
......@@ -23,7 +23,11 @@
#include <xen/dom0_ops.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 "datatypes.h"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册