Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 4 Mar 2016 22:03:38 +0000 (UTC)
From:      "Pedro F. Giffuni" <pfg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r296394 - head/include/rpc
Message-ID:  <201603042203.u24M3c7t043681@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: pfg
Date: Fri Mar  4 22:03:38 2016
New Revision: 296394
URL: https://svnweb.freebsd.org/changeset/base/296394

Log:
  xdr: Fix xdr_rpc* defines.
  
  The defines for xdr_rpc* in xdr.h are wrong. It could be
  very well that Solaris did strip the '_t' from xdr_u_int32_t,
  but Solaris has a xdr_u_int32 function, we don't have this.
  So all of this defines will lead to an unresolved symbol.
  
  This explains why we do not use these functions in FreeBSD
  while they are used in Illumos/Solaris.
  
  Obtained from:	linux libtirpc (git 7864122e61ffe4db1aa8ace89117358a1e3a391b)
  MFC after:	3 weeks

Modified:
  head/include/rpc/xdr.h

Modified: head/include/rpc/xdr.h
==============================================================================
--- head/include/rpc/xdr.h	Fri Mar  4 21:22:11 2016	(r296393)
+++ head/include/rpc/xdr.h	Fri Mar  4 22:03:38 2016	(r296394)
@@ -219,15 +219,11 @@ xdr_putint32(XDR *xdrs, int32_t *ip)
 		(*(xdrs)->x_ops->x_control)(xdrs, req, op)
 #define xdr_control(xdrs, req, op) XDR_CONTROL(xdrs, req, op)
 
-/*
- * Solaris strips the '_t' from these types -- not sure why.
- * But, let's be compatible.
- */
-#define xdr_rpcvers(xdrs, versp) xdr_u_int32(xdrs, versp)
-#define xdr_rpcprog(xdrs, progp) xdr_u_int32(xdrs, progp)
-#define xdr_rpcproc(xdrs, procp) xdr_u_int32(xdrs, procp)
-#define xdr_rpcprot(xdrs, protp) xdr_u_int32(xdrs, protp)
-#define xdr_rpcport(xdrs, portp) xdr_u_int32(xdrs, portp)
+#define xdr_rpcvers(xdrs, versp) xdr_u_int32_t(xdrs, versp)
+#define xdr_rpcprog(xdrs, progp) xdr_u_int32_t(xdrs, progp)
+#define xdr_rpcproc(xdrs, procp) xdr_u_int32_t(xdrs, procp)
+#define xdr_rpcprot(xdrs, protp) xdr_u_int32_t(xdrs, protp)
+#define xdr_rpcport(xdrs, portp) xdr_u_int32_t(xdrs, portp)
 
 /*
  * Support struct for discriminated unions.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201603042203.u24M3c7t043681>