daemon/Win32: Don't include missing headers.
authorRichard Jones <rjones@redhat.com>
Fri, 20 Nov 2009 10:41:07 +0000 (10:41 +0000)
committerRichard Jones <rjones@redhat.com>
Fri, 20 Nov 2009 10:41:07 +0000 (10:41 +0000)
This is a partial fix for code in guestfsd.c where many of these
header files are missing on Win32.

daemon/guestfsd.c

index 9375ede..4b91660 100644 (file)
 #include <rpc/types.h>
 #include <rpc/xdr.h>
 #include <getopt.h>
-#include <netdb.h>
 #include <sys/param.h>
-#include <sys/select.h>
 #include <sys/types.h>
-#include <sys/wait.h>
 #include <sys/stat.h>
 #include <fcntl.h>
 #include <signal.h>
+
+#ifdef HAVE_NETDB_H
+#include <netdb.h>
+#endif
+
+#ifdef HAVE_SYS_SELECT_H
+#include <sys/select.h>
+#endif
+
+#ifdef HAVE_SYS_WAIT_H
+#include <sys/wait.h>
+#endif
+
+#ifdef HAVE_PRINTF_H
 #include <printf.h>
+#endif
 
 #include "c-ctype.h"
 #include "ignore-value.h"