Index: src/domain_conf.c
===================================================================
RCS file: /data/cvs/libvirt/src/domain_conf.c,v
retrieving revision 1.17
diff -u -r1.17 domain_conf.c
--- src/domain_conf.c	8 Aug 2008 15:03:00 -0000	1.17
+++ src/domain_conf.c	11 Aug 2008 10:53:21 -0000
@@ -24,6 +24,7 @@
 #include <config.h>
 
 #include <sys/types.h>
+#include <sys/stat.h>
 #include <unistd.h>
 #include <fcntl.h>
 #include <dirent.h>
Index: src/domain_conf.h
===================================================================
RCS file: /data/cvs/libvirt/src/domain_conf.h,v
retrieving revision 1.6
diff -u -r1.6 domain_conf.h
--- src/domain_conf.h	8 Aug 2008 15:03:00 -0000	1.6
+++ src/domain_conf.h	11 Aug 2008 10:53:21 -0000
@@ -444,9 +444,11 @@
 typedef struct _virDomainObj virDomainObj;
 typedef virDomainObj *virDomainObjPtr;
 struct _virDomainObj {
+#ifdef WITH_QEMU
     int stdin;
     int stdout;
     int stderr;
+#endif
     int monitor;
     int logfile;
     int pid;
Index: src/network_conf.c
===================================================================
RCS file: /data/cvs/libvirt/src/network_conf.c,v
retrieving revision 1.5
diff -u -r1.5 network_conf.c
--- src/network_conf.c	6 Aug 2008 12:08:49 -0000	1.5
+++ src/network_conf.c	11 Aug 2008 10:53:21 -0000
@@ -27,6 +27,7 @@
 
 #include <arpa/inet.h>
 #include <sys/types.h>
+#include <sys/stat.h>
 #include <unistd.h>
 #include <fcntl.h>
 #include <dirent.h>
Index: src/util.c
===================================================================
RCS file: /data/cvs/libvirt/src/util.c,v
retrieving revision 1.45
diff -u -r1.45 util.c
--- src/util.c	8 Aug 2008 15:43:38 -0000	1.45
+++ src/util.c	11 Aug 2008 10:53:22 -0000
@@ -262,7 +262,7 @@
 
 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 @@
 
 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,
Index: src/virsh.c
===================================================================
RCS file: /data/cvs/libvirt/src/virsh.c,v
retrieving revision 1.160
diff -u -r1.160 virsh.c
--- src/virsh.c	1 Aug 2008 14:30:41 -0000	1.160
+++ src/virsh.c	11 Aug 2008 10:53:24 -0000
@@ -80,6 +80,9 @@
 #define LVL_WARNING   "WARNING"
 #define LVL_ERROR     "ERROR"
 
+#ifndef WEXITSTATUS
+# define WEXITSTATUS(x) ((x) & 0xff)
+#endif
 /**
  * vshErrorLevel:
  *
Index: tests/testutilsxen.c
===================================================================
RCS file: /data/cvs/libvirt/tests/testutilsxen.c,v
retrieving revision 1.1
diff -u -r1.1 testutilsxen.c
--- tests/testutilsxen.c	25 Jul 2008 13:17:27 -0000	1.1
+++ tests/testutilsxen.c	11 Aug 2008 10:53:24 -0000
@@ -1,5 +1,6 @@
 #include <config.h>
 
+#ifdef WITH_XEN
 #include <sys/utsname.h>
 #include <stdlib.h>
 
@@ -51,3 +52,4 @@
     virCapabilitiesFree(caps);
     return NULL;
 }
+#endif
