diff --git a/src/Makefile.am b/src/Makefile.am index 18b1cec..a29f607 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -54,7 +54,7 @@ libtirpc_la_SOURCES = auth_none.c auth_unix.c authunix_prot.c bindresvport.c cln auth_time.c auth_des.c authdes_prot.c debug.c ## XDR -libtirpc_la_SOURCES += xdr.c xdr_rec.c xdr_array.c xdr_float.c xdr_mem.c xdr_reference.c xdr_stdio.c +libtirpc_la_SOURCES += xdr.c xdr_rec.c xdr_array.c xdr_float.c xdr_mem.c xdr_reference.c xdr_stdio.c xdr_sizeof.c if SYMVERS libtirpc_la_LDFLAGS += -Wl,--version-script=$(srcdir)/libtirpc.map diff --git a/src/libtirpc.map b/src/libtirpc.map index 449b769..855d6b3 100644 --- a/src/libtirpc.map +++ b/src/libtirpc.map @@ -321,6 +321,7 @@ TIRPC_0.3.3 { __key_encryptsession_pk_LOCAL; __key_gendes_LOCAL; authdes_pk_create; + xdr_sizeof; } TIRPC_0.3.2; TIRPC_PRIVATE { diff --git a/src/xdr_sizeof.c b/src/xdr_sizeof.c index cc5414b..4ecc977 100644 --- a/src/xdr_sizeof.c +++ b/src/xdr_sizeof.c @@ -90,7 +90,7 @@ x_inline(xdrs, len) if (xdrs->x_op != XDR_ENCODE) { return (NULL); } - if (len < (u_int)xdrs->x_base) { + if (len < (u_int) (long int) xdrs->x_base) { /* x_private was already allocated */ xdrs->x_handy += len; return ((int32_t *) xdrs->x_private); @@ -102,7 +102,7 @@ x_inline(xdrs, len) xdrs->x_base = 0; return (NULL); } - xdrs->x_base = (caddr_t) len; + xdrs->x_base = (void *) (long) len; xdrs->x_handy += len; return ((int32_t *) xdrs->x_private); } diff --git a/tirpc/rpc/xdr.h b/tirpc/rpc/xdr.h index 64069ab..904e5bb 100644 --- a/tirpc/rpc/xdr.h +++ b/tirpc/rpc/xdr.h @@ -327,6 +327,7 @@ extern bool_t xdr_hyper(XDR *, quad_t *); extern bool_t xdr_u_hyper(XDR *, u_quad_t *); extern bool_t xdr_longlong_t(XDR *, quad_t *); extern bool_t xdr_u_longlong_t(XDR *, u_quad_t *); +extern u_long xdr_sizeof(xdrproc_t, void *); #ifdef __cplusplus } #endif