#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>
#define GUESTFWD_ADDR "10.0.2.4"
#define GUESTFWD_PORT "6666"
+/* This is only a hint. If not defined, ignore it. */
+#ifndef AI_ADDRCONFIG
+#define AI_ADDRCONFIG 0
+#endif
+
int verbose = 0;
static int print_shell_quote (FILE *stream, const struct printf_info *info, const void *const *args);
printf ("could not read linux command line\n");
}
+#ifndef WIN32
/* Make sure SIGPIPE doesn't kill us. */
struct sigaction sa;
memset (&sa, 0, sizeof sa);
sa.sa_flags = 0;
if (sigaction (SIGPIPE, &sa, NULL) == -1)
perror ("sigaction SIGPIPE"); /* but try to continue anyway ... */
+#endif
/* Set up a basic environment. After we are called by /init the
* environment is essentially empty.
XDR xdr;
uint32_t len = GUESTFS_LAUNCH_FLAG;
xdrmem_create (&xdr, lenbuf, sizeof lenbuf, XDR_ENCODE);
- xdr_uint32_t (&xdr, &len);
+ xdr_u_int (&xdr, &len);
if (xwrite (sock, lenbuf, sizeof lenbuf) == -1)
exit (EXIT_FAILURE);