- if (xdr_reference(xdrs, &port_ptr, sizeof (u_long),
- xdr_u_long) && xdr_u_long(xdrs, &crp->resultslen)) {
- crp->port_ptr = (u_long *)port_ptr;
- return ((*(crp->xdr_results))(xdrs, crp->results_ptr));
+#ifdef __LP64__
+ if (xdr_reference(xdrs, &port_ptr, sizeof (uint32_t), (xdrproc_t)xdr_u_long) && xdr_u_long(xdrs, &crp->resultslen)) {
+ crp->port_ptr = (unsigned int *)port_ptr;
+ return ((*(crp->xdr_results))(xdrs, crp->results_ptr, 0));
+ }
+#else
+ if (xdr_reference(xdrs, &port_ptr, sizeof (u_long), (xdrproc_t)xdr_u_long) && xdr_u_long(xdrs, &crp->resultslen)) {
+ crp->port_ptr = (unsigned long *)port_ptr;
+ return ((*(crp->xdr_results))(xdrs, crp->results_ptr, 0));