Thu Jul 19 16:35:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>

* configure.in, src/xen_internal.c: Newer Xen uses
          <xen/sys/privcmd.h>.  Added detection code for this in
          configure.in.
This commit is contained in:
Richard W.M. Jones 2007-07-19 15:37:54 +00:00
parent 30c10b82c1
commit e2ea955881
3 changed files with 36 additions and 0 deletions

View File

@ -1,3 +1,9 @@
Thu Jul 19 16:35:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>
* configure.in, src/xen_internal.c: Newer Xen uses
<xen/sys/privcmd.h>. Added detection code for this in
configure.in.
Thu Jul 19 15:38:44 CEST 2007 Daniel Veillard <veillard@redhat.com>
* src/xen_internal.c: rewrite of range check in credit scheduler

View File

@ -212,6 +212,28 @@ else
if test "$WITH_XEN" != "0" ; then
LIBVIRT_FEATURES="$LIBVIRT_FEATURES -DWITH_XEN"
fi
AC_CHECK_HEADERS(xen/xen.h xen/version.h xen/dom0_ops.h,,[
AC_MSG_ERROR([Cannot find standard Xen headers. Is xen-devel installed?])
],
[#include <stdio.h>
#include <stdint.h>
])
dnl Search for the location of <xen/{linux,sys}/privcmd.h>.
AC_CHECK_HEADERS(xen/sys/privcmd.h,,[
AC_CHECK_HEADERS(xen/linux/privcmd.h,,[
AC_MSG_ERROR([Cannot find header file <xen/linux/privcmd.h> or <xen/sys/privcmd.h>. Is xen-devel installed?])
],
[#include <stdio.h>
#include <stdint.h>
#include <xen/xen.h>
])
],
[#include <stdio.h>
#include <stdint.h>
#include <xen/xen.h>
])
fi
dnl

View File

@ -10,6 +10,8 @@
#ifdef WITH_XEN
#include "config.h"
#include <stdio.h>
#include <string.h>
/* required for uint8_t, uint32_t, etc ... */
@ -30,7 +32,13 @@
#include <xen/dom0_ops.h>
#include <xen/version.h>
#include <xen/xen.h>
#ifdef HAVE_XEN_LINUX_PRIVCMD_H
#include <xen/linux/privcmd.h>
#else
#ifdef HAVE_XEN_SYS_PRIVCMD_H
#include <xen/sys/privcmd.h>
#endif
#endif
/* required for shutdown flags */
#include <xen/sched.h>