"Richard W.M. Jones" <rjones(a)redhat.com> wrote:
Guido Guenther wrote:
> On Thu, Jan 31, 2008 at 04:14:09PM +0100, Jim Meyering wrote:
>> Guido Guenther <agx(a)sigxcpu.org> wrote:
>>> statstest.c needs to check if USE_XEN > 0, otherwise compilation breaks
>>> on --without-xen builds. Please apply if appropriate. Patch is against
...
Looks good to me.
Same here.
This is what I expect to apply in an hour or so:
Thu Jan 31 20:12:40 CET 2008 Guido Guenther <agx(a)sigxcpu.org>
Avoid compilation failure when building --without-xen.
* tests/statstest.c (testDevice) [!WITH_XEN]: #ifdef-out.
(main) [!WITH_XEN]: #ifdef-out the body.
Signed-off-by: Jim Meyering <meyering(a)redhat.com>
---
ChangeLog | 6 ++++++
tests/statstest.c | 4 ++--
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 27e5089..1c46da7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Thu Jan 31 20:12:40 CET 2008 Guido Guenther <agx(a)sigxcpu.org>
+
+ Avoid compilation failure when building --without-xen.
+ * tests/statstest.c (testDevice) [!WITH_XEN]: #ifdef-out.
+ (main) [!WITH_XEN]: #ifdef-out the body.
+
Wed Jan 30 20:49:34 CET 2008 Jim Meyering <meyering(a)redhat.com>
Avoid virsh leaks due to missing virDomainFree(dom) calls
diff --git a/tests/statstest.c b/tests/statstest.c
index 4c19833..6213da8 100644
--- a/tests/statstest.c
+++ b/tests/statstest.c
@@ -12,7 +12,7 @@ static void testQuietError(void *userData ATTRIBUTE_UNUSED, virErrorPtr
error AT
/* nada */
}
-#ifdef __linux__
+#if __linux__ && WITH_XEN
static int testDevice(const char *path, int expect)
{
int actual = xenLinuxDomainDeviceID(NULL, 1, path);
@@ -31,7 +31,7 @@ int
main(void)
{
int ret = 0;
-#ifdef __linux__
+#if __linux__ && WITH_XEN
/* Some of our tests delibrately test failure cases, so
* register a handler to stop error messages cluttering
* up display
--
1.5.4.rc5.1.ge6bfe