Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 17 Apr 2020 06:02:13 +0000 (UTC)
From:      Gleb Smirnoff <glebius@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r360035 - in head/sys: rpc xdr
Message-ID:  <202004170602.03H62D0n066777@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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
  */



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