[Libguestfs] [PATCH] daemon/Win32: Use xdr_u_int for PortableXDR compatibility.
Jim Meyering
jim at meyering.net
Wed Nov 25 17:56:25 UTC 2009
Richard W.M. Jones wrote:
> Subject: [PATCH 3/7] daemon/Win32: Use xdr_u_int for PortableXDR compatibility.
>
> PortableXDR didn't support xdr_uint32_t. xdr_u_int is the same type.
It looks to me like xdr_uint32_t is the preferred name,
because it is more descriptive.
If so, can you do something like this instead?
#define xdr_uint32_t xdr_u_int
or use a typedef?
> 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);
...
More information about the Libguestfs
mailing list