commit 416eca189b1934cfa8575ab72d142ec77600fcf9 Author: Jim Fehlig Date: Wed Sep 26 15:20:35 2012 -0600 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 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. Index: libvirt-0.10.2/configure.ac =================================================================== --- libvirt-0.10.2.orig/configure.ac +++ libvirt-0.10.2/configure.ac @@ -768,6 +768,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 Index: libvirt-0.10.2/src/xen/block_stats.c =================================================================== --- libvirt-0.10.2.orig/src/xen/block_stats.c +++ libvirt-0.10.2/src/xen/block_stats.c @@ -32,7 +32,11 @@ # include # include -# include +# if HAVE_XENSTORE_H +# include +# else +# include +# endif # include "virterror_internal.h" # include "datatypes.h" Index: libvirt-0.10.2/src/xen/xs_internal.c =================================================================== --- libvirt-0.10.2.orig/src/xen/xs_internal.c +++ libvirt-0.10.2/src/xen/xs_internal.c @@ -35,7 +35,11 @@ #include #include -#include +#if HAVE_XENSTORE_H +# include +#else +# include +#endif #include "virterror_internal.h" #include "datatypes.h"