Re: [PATCH] xen/?/privcmd.h

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



John Levon wrote:
On Wed, Jul 18, 2007 at 03:17:20PM +0100, Richard W.M. Jones wrote:

Can you test the attached patch to see if it fixes this problem for you?

It's much preferred to test xen/sys/privcmd.h first. This is what is
used with current Xen onwards, i.e. xen/linux/privcmd.h should only be a
fallback, not preferred.

Updated patch, just swaps the order of the tests.

Rich.

--
Emerging Technologies, Red Hat - http://et.redhat.com/~rjones/
Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod
Street, Windsor, Berkshire, SL4 1TE, United Kingdom.  Registered in
England and Wales under Company Registration No. 03798903
Index: configure.in
===================================================================
RCS file: /data/cvs/libvirt/configure.in,v
retrieving revision 1.77
diff -u -r1.77 configure.in
--- configure.in	17 Jul 2007 13:27:26 -0000	1.77
+++ configure.in	18 Jul 2007 14:44:15 -0000
@@ -212,6 +212,28 @@
     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
Index: src/xen_internal.c
===================================================================
RCS file: /data/cvs/libvirt/src/xen_internal.c,v
retrieving revision 1.85
diff -u -r1.85 xen_internal.c
--- src/xen_internal.c	12 Jul 2007 08:57:52 -0000	1.85
+++ src/xen_internal.c	18 Jul 2007 14:46:34 -0000
@@ -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>

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]