From: Richard Jones Date: Wed, 25 Nov 2009 14:45:20 +0000 (+0000) Subject: daemon/Win32: Use xdr_u_int for PortableXDR compatibility. X-Git-Tag: 1.0.80~43 X-Git-Url: http://git.annexia.org/?a=commitdiff_plain;h=55355491c5ad2535b99a31ec81241f7f9f92177e;p=libguestfs.git daemon/Win32: Use xdr_u_int for PortableXDR compatibility. PortableXDR didn't support xdr_uint32_t. xdr_u_int is the same type. --- diff --git a/daemon/guestfsd.c b/daemon/guestfsd.c index 67206d0..f31f1f2 100644 --- a/daemon/guestfsd.c +++ b/daemon/guestfsd.c @@ -311,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); diff --git a/daemon/proto.c b/daemon/proto.c index 4106d92..2231037 100644 --- a/daemon/proto.c +++ b/daemon/proto.c @@ -67,7 +67,7 @@ main_loop (int _sock) exit (EXIT_FAILURE); xdrmem_create (&xdr, lenbuf, 4, XDR_DECODE); - xdr_uint32_t (&xdr, &len); + xdr_u_int (&xdr, &len); xdr_destroy (&xdr); if (len > GUESTFS_MESSAGE_MAX) { @@ -233,7 +233,7 @@ send_error (const char *msg) xdr_destroy (&xdr); xdrmem_create (&xdr, lenbuf, 4, XDR_ENCODE); - xdr_uint32_t (&xdr, &len); + xdr_u_int (&xdr, &len); xdr_destroy (&xdr); if (xwrite (sock, lenbuf, 4) == -1) { @@ -285,7 +285,7 @@ reply (xdrproc_t xdrp, char *ret) xdr_destroy (&xdr); xdrmem_create (&xdr, lenbuf, 4, XDR_ENCODE); - xdr_uint32_t (&xdr, &len); + xdr_u_int (&xdr, &len); xdr_destroy (&xdr); if (xwrite (sock, lenbuf, 4) == -1) { @@ -315,7 +315,7 @@ receive_file (receive_cb cb, void *opaque) exit (EXIT_FAILURE); xdrmem_create (&xdr, lenbuf, 4, XDR_DECODE); - xdr_uint32_t (&xdr, &len); + xdr_u_int (&xdr, &len); xdr_destroy (&xdr); if (len == GUESTFS_CANCEL_FLAG) @@ -380,7 +380,7 @@ cancel_receive (void) uint32_t flag = GUESTFS_CANCEL_FLAG; xdrmem_create (&xdr, fbuf, sizeof fbuf, XDR_ENCODE); - xdr_uint32_t (&xdr, &flag); + xdr_u_int (&xdr, &flag); xdr_destroy (&xdr); if (xwrite (sock, fbuf, sizeof fbuf) == -1) { @@ -455,7 +455,7 @@ check_for_library_cancellation (void) return 0; xdrmem_create (&xdr, buf, sizeof buf, XDR_DECODE); - xdr_uint32_t (&xdr, &flag); + xdr_u_int (&xdr, &flag); xdr_destroy (&xdr); if (flag != GUESTFS_CANCEL_FLAG) { @@ -497,7 +497,7 @@ send_chunk (const guestfs_chunk *chunk) xdr_destroy (&xdr); xdrmem_create (&xdr, lenbuf, 4, XDR_ENCODE); - xdr_uint32_t (&xdr, &len); + xdr_u_int (&xdr, &len); xdr_destroy (&xdr); int err = (xwrite (sock, lenbuf, 4) == 0