From 43c7f972aa3388b8f97c4aaad667a6515a30314e Mon Sep 17 00:00:00 2001 From: Atsushi SAKAI Date: Tue, 12 Aug 2008 08:25:48 +0000 Subject: [PATCH] fix compilation for MinGW --- ChangeLog | 5 +++++ src/domain_conf.c | 1 + src/network_conf.c | 1 + src/util.c | 4 ++-- src/virsh.c | 3 +++ tests/testutilsxen.c | 2 ++ 6 files changed, 14 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index c2e450d6ca..ae8d01c4b3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Tue Aug 12 17:20:36 JST 2008 Atsushi SAKAI + + * src/domain.conf.c src/network_conf.c src/util.c src/virsh.c + tests/testutilsxen.c: fix compilation for MinGW + Tue Aug 12 10:09:23 CEST 2008 Daniel Veillard * python/generator.py: patch from Cole Robinson trying to fix diff --git a/src/domain_conf.c b/src/domain_conf.c index 237579ff15..4f20cac994 100644 --- a/src/domain_conf.c +++ b/src/domain_conf.c @@ -24,6 +24,7 @@ #include #include +#include #include #include #include diff --git a/src/network_conf.c b/src/network_conf.c index f70c73dac2..8af40d205a 100644 --- a/src/network_conf.c +++ b/src/network_conf.c @@ -27,6 +27,7 @@ #include #include +#include #include #include #include diff --git a/src/util.c b/src/util.c index d1b7ae16d4..9f056e01c5 100644 --- a/src/util.c +++ b/src/util.c @@ -262,7 +262,7 @@ virRun(virConnectPtr conn, int virExec(virConnectPtr conn, - char **argv ATTRIBUTE_UNUSED, + const char *const*argv ATTRIBUTE_UNUSED, int *retpid ATTRIBUTE_UNUSED, int infd ATTRIBUTE_UNUSED, int *outfd ATTRIBUTE_UNUSED, @@ -274,7 +274,7 @@ virExec(virConnectPtr conn, int virExecNonBlock(virConnectPtr conn, - char **argv ATTRIBUTE_UNUSED, + const char *const*argv ATTRIBUTE_UNUSED, int *retpid ATTRIBUTE_UNUSED, int infd ATTRIBUTE_UNUSED, int *outfd ATTRIBUTE_UNUSED, diff --git a/src/virsh.c b/src/virsh.c index 5499b374bc..122ff6fc9c 100644 --- a/src/virsh.c +++ b/src/virsh.c @@ -80,6 +80,9 @@ static char *progname; #define LVL_WARNING "WARNING" #define LVL_ERROR "ERROR" +#ifndef WEXITSTATUS +# define WEXITSTATUS(x) ((x) & 0xff) +#endif /** * vshErrorLevel: * diff --git a/tests/testutilsxen.c b/tests/testutilsxen.c index 7685bd2cde..a16d91291f 100644 --- a/tests/testutilsxen.c +++ b/tests/testutilsxen.c @@ -1,5 +1,6 @@ #include +#ifdef WITH_XEN #include #include @@ -51,3 +52,4 @@ cleanup: virCapabilitiesFree(caps); return NULL; } +#endif