daemon/Win32: Use xdr_u_int for PortableXDR compatibility.
[libguestfs.git] / daemon / guestfsd.c
index e6384d2..f31f1f2 100644 (file)
@@ -157,6 +157,7 @@ main (int argc, char *argv[])
       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);
@@ -164,6 +165,7 @@ main (int argc, char *argv[])
   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.
@@ -309,7 +311,7 @@ main (int argc, char *argv[])
   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);