svn commit: r360035 - in head/sys: rpc xdr

Gleb Smirnoff glebius at FreeBSD.org
Fri Apr 17 06:02:14 UTC 2020


Author: glebius
Date: Fri Apr 17 06:02:13 2020
New Revision: 360035
URL: https://svnweb.freebsd.org/changeset/base/360035

Log:
  Move M_RPC malloc type into XDR.  Both RPC and XDR libraries use
  this type, but since RPC depends on XDR (not vice versa) we need
  it defined in XDR to make the module loadable without RPC.
  
  Reviewed by:	rmacklem
  Differential Revision:	https://reviews.freebsd.org/D24408

Modified:
  head/sys/rpc/rpc_prot.c
  head/sys/xdr/xdr.c

Modified: head/sys/rpc/rpc_prot.c
==============================================================================
--- head/sys/rpc/rpc_prot.c	Fri Apr 17 05:59:38 2020	(r360034)
+++ head/sys/rpc/rpc_prot.c	Fri Apr 17 06:02:13 2020	(r360035)
@@ -61,8 +61,6 @@ __FBSDID("$FreeBSD$");
 #include <rpc/clnt.h>
 #include <rpc/rpc_msg.h>
 
-MALLOC_DEFINE(M_RPC, "rpc", "Remote Procedure Call");
-
 #define assert(exp)	KASSERT(exp, ("bad arguments"))
 
 static enum clnt_stat accepted(enum accept_stat, struct rpc_err *);

Modified: head/sys/xdr/xdr.c
==============================================================================
--- head/sys/xdr/xdr.c	Fri Apr 17 05:59:38 2020	(r360034)
+++ head/sys/xdr/xdr.c	Fri Apr 17 06:02:13 2020	(r360035)
@@ -65,6 +65,8 @@ typedef u_quad_t        u_longlong_t;   /* ANSI unsign
 #define XDR_FALSE	((long) 0)
 #define XDR_TRUE	((long) 1)
 
+MALLOC_DEFINE(M_RPC, "rpc", "Remote Procedure Call");
+
 /*
  * for unit alignment
  */


More information about the svn-src-all mailing list