public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/musl:master commit in: net-libs/libtirpc/, net-libs/libtirpc/files/
@ 2017-03-29 16:47 Aric Belsito
  0 siblings, 0 replies; 6+ messages in thread
From: Aric Belsito @ 2017-03-29 16:47 UTC (permalink / raw
  To: gentoo-commits

commit:     8f87452d0bb35730435a53864a58e6332912ec50
Author:     Rasmus Thomsen <rasmus.thomsen <AT> live <DOT> de>
AuthorDate: Wed Mar 29 14:23:46 2017 +0000
Commit:     Aric Belsito <lluixhi <AT> gmail <DOT> com>
CommitDate: Wed Mar 29 16:37:57 2017 +0000
URL:        https://gitweb.gentoo.org/proj/musl.git/commit/?id=8f87452d

net-libs/libtirpc: version bump to 1.0.1

 net-libs/libtirpc/Manifest                         |   5 +-
 net-libs/libtirpc/files/git.patch                  | 842 +++++++++++++++++++++
 ...irpc-0.2.5-r99.ebuild => libtirpc-0.2.5.ebuild} |   7 +-
 ...irpc-0.2.5-r99.ebuild => libtirpc-1.0.1.ebuild} |  31 +-
 4 files changed, 858 insertions(+), 27 deletions(-)

diff --git a/net-libs/libtirpc/Manifest b/net-libs/libtirpc/Manifest
index dd38c56..f6b2a02 100644
--- a/net-libs/libtirpc/Manifest
+++ b/net-libs/libtirpc/Manifest
@@ -5,8 +5,11 @@ AUX 0004-fix_DECLS.patch 29124 SHA256 bdc844c56cfe2d5b060d59fee009576895504e2df4
 AUX 0005-fix_remaining_issues.patch 373 SHA256 db061da4e22c4ed9192587a622454e69c6999b5ccfdafa5588957440051277e2 SHA512 db70a64424904a669534e25c70b13dffb0ddd3437e81f6fee69ac2399e00bdd4e83ee9c65bc0bb789e28c1ac8e030a22461642e699fd371a4f147782a5845912 WHIRLPOOL 06e9f643c66867ddf965427e5c874eaa3c4275b961634d3fc669120275e3db8613a9bd997d612976c078584e016234f34e5a4abfeef20eb655997c7825e8cb56
 AUX 0006-fix_queue_h_include.patch 1788 SHA256 3b8f296eb375052210874ebc3caeadd0cdf689a27e279761e16d76b411e89f8f SHA512 f5a419d883dc6fc0bc6ebb02c3b1f7ce95aeb2b261eb5a49498b600844a27041b32f146fd8bba3d1769c32a67a15b9e40d9ffe3598d9448ebfc4fde6446e69aa WHIRLPOOL 1e7b71255a11abd45dc88b74d8d8146f60c0a621ebe42f437e45e01f791a0ca020c27f841091f556d33fd284336b2e8cc8fa91fa9ca9ed5dd5904c1a5fe82212
 AUX 0007-no-des.patch 960 SHA256 12823f030b803045108df782018d04ca253d4439b0e92015ddb140dcd33c1be3 SHA512 95ad086657d008a01a4072ba7141391cbbe8ac35372b2f063a3f9774eb5dfa12b97bcff0c1b6da2d887001beaa60a8524823df93a8de2fdb73ad2a30340770ba WHIRLPOOL bd075834fddeff5ae86b90273f5c7b820f88649045e65b63d09dc26c35ada0fd1162dcf8aeb1cd82ad59b9092eceb92e154fa58c9beca540dc31ead7cc96b72e
+AUX git.patch 24736 SHA256 0a62de190d38660efff0ddbb73b5b6315fdc015c20cf9c235e35c0cf7eeb0e85 SHA512 4dd540470e9a25b5df0ea2c883dd647f26b71ed82e880c7efa4eed51dd98b898e18964a3ee998ceeadf39caed0a661f110f72157ec70584e33131d0a0f375a00 WHIRLPOOL 3b7fe2207ea84b56ce889778c4ef31669afe7dd340270063c1ac09accc3459e4d53bd5d084bfa090ec041fb188cd8bac6aad55d7fd60f43e485c89d53e06b14e
 AUX libtirpc-0.2.5-stdarg.patch 667 SHA256 2b31b1148af9d96c9a9e6f609c0b5b03424954d6251c18d64b6119afd8afa6f7 SHA512 2197f8c2ed3b4dbfc54ee37e973a6e275d19c6dde5d066b9ce45beecdbb17c9e620d7c6f0997b7ebfeb2bd1741327028a793b34edd94d59a89c8b36ac102b025 WHIRLPOOL 90d4e88c18f0d93ab8dfef4981377c2a6df42ff90b70049d07e203e7b66a5087910fe501cf9e1b93782eb25a8b3a8680c03287ccc563b838f517e5d1524b12c5
 DIST libtirpc-0.2.5.tar.bz2 459094 SHA256 62f9de7c2c8686c568757730e1fef66502a0e00d6cacf33546d0267984e002db SHA512 9f8afa1acb04a2c2c558018f2528f8caaa79994a2af2abeed947f914145872ef72988b241e11925c799db0de9ec51fd9baecd2b08150240b22f91e2e55a45194 WHIRLPOOL a2b4f1c4825f2b774c2290cccd9d552bb7566ec9eb5988d3ab619d7870a907600f67e7af39fbc3e245606db8534f114c990145789c383206d3a9cf96cf043d8c
+DIST libtirpc-1.0.1.tar.bz2 495125 SHA256 5156974f31be7ccbc8ab1de37c4739af6d9d42c87b1d5caf4835dda75fcbb89e SHA512 c9b449e737bc2bd3d56e31e8352f312e89a7ec2a11b73b5ac314e7d82d3b644c611e422b623912453b67b668f86a6de7bb7f18c9495dd15de8e2798ec2ff41c8 WHIRLPOOL cce6a4e69bd634b40d66594a81c23d2044b63eec16d6c96d6fcfaa7f2ca41fb9af99c8e2b964ec12be82682afa4090b218d7e14399fdfc9b32df6c2234bc3c9e
 DIST libtirpc-glibc-nfs.tar.xz 8948 SHA256 2677cfedf626f3f5a8f6e507aed5bb8f79a7453b589d684dbbc086e755170d83 SHA512 90255bf0a27af16164e0710dd940778609925d473f4343093ff19d98cc4f23023788bf4edf0178eae1961afc0ba8b69b273de95b7d7e2afdb706701d8ba6f7ba WHIRLPOOL 06bcf3fd4e424a86071e5c4ddeb89aa571c862e765aae9382d9f9a55ab72cd1c623490555c1a9bd3380a2d04ecb10fb47a75a7dddf449d4368a1a01617226858
-EBUILD libtirpc-0.2.5-r99.ebuild 1911 SHA256 bde412b1d481fa28be314a0a4403c013b80dda526fba92bb80cdffd9208512f1 SHA512 c33059986e47d2b90e0544807ef26203346aeb4ccd22d3d680e423a7e5eb20b1d101e0dbb8ecce91b7c4d85ebe2ccc37e7be87dd4a4de3ba99f85a8d6838f43b WHIRLPOOL 523fed87584a6a76e21f4ad1e18ae9f7f0cf392729f927bf80d02ab6c9b6080747e4c4daa42cf4903026c9b91330a8b0577baa9961a4fac65edb376f12f50b38
+EBUILD libtirpc-0.2.5.ebuild 1920 SHA256 787410d5dfb2794a29c607fd47db15230d42050eabd9ddc57efe86486e31c64b SHA512 b9fbd63c6356a0d3e5f3a7d3b40727baa5039175d664cb14f49601c845d70767bd2bbd848b50541275e645cf7eb64b4ddab98475c0cf327d41992f92cd588b88 WHIRLPOOL 523e39ae954a6477a84382df171cab339e4be5b5dcb8db21150691b0b0cff13484e69d45256c7a15947a09d7f1b7fab9a37b58a8a22857fe3c53115e091af596
+EBUILD libtirpc-1.0.1.ebuild 1406 SHA256 c2a3172d3c56d7a52c9482e2e49c0ab12689d1902fca8841610f5627dfe8b0d9 SHA512 9ebd926c82f52d979758be194afeb62c12e36bbd5ab33c92616c1488f27860bce65a93a30513f6ad6ecddd3e2c328e482696c4b7e9884dff6f3802ba904f7388 WHIRLPOOL 6acebb4842b8a23397b74ebfa2c470bcca1ef8152f9306f50f3efbda52de97ba157144253b2b3f894010b24a9eab221fa4cc78108bba580cb2365cdeb232d1cf
 MISC metadata.xml 335 SHA256 02e9487e791e2d6aa99e74025dd90a6c54d86c73d530c96316e93f7552e1439a SHA512 d6dd857293827907e545dc6e8631d06682d20e13442f8ce6cbd2e2a789d885c8a788f4ed1d062a8c54c4165d22eb096279d4c2f598e462a57faaf8bec1e9777b WHIRLPOOL 6a802fc6b1fdd5bc815c4d2d41de0cba5cff351cdd1fa80021c02233b3facf21674d94ec7b822c2d514e5e1c721cf3ae2b88c885afdce8a7b60d2e63da71183c

diff --git a/net-libs/libtirpc/files/git.patch b/net-libs/libtirpc/files/git.patch
new file mode 100644
index 0000000..e458563
--- /dev/null
+++ b/net-libs/libtirpc/files/git.patch
@@ -0,0 +1,842 @@
+diff --git a/.gitignore b/.gitignore
+index b7814a3..ef97e01 100644
+--- a/.gitignore
++++ b/.gitignore
+@@ -34,6 +34,9 @@ libtirpc.pc
+ lib*.a
+ src/libtirpc.la
+ src/libtirpc_la-*.lo
++tirpc/stamp-h2
++tirpc/tirpc-features.h
++
+ # generic editor backup et al
+ *~
+ .stgitmail.txt
+diff --git a/src/Makefile.am b/src/Makefile.am
+index e4ed8aa..fba2aa4 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -24,7 +24,7 @@ libtirpc_la_SOURCES = auth_none.c auth_unix.c authunix_prot.c bindresvport.c cln
+         rpcb_st_xdr.c svc.c svc_auth.c svc_dg.c svc_auth_unix.c svc_auth_none.c \
+ 	svc_auth_des.c \
+         svc_generic.c svc_raw.c svc_run.c svc_simple.c svc_vc.c getpeereid.c \
+-        auth_time.c auth_des.c authdes_prot.c debug.c
++        auth_time.c auth_des.c authdes_prot.c debug.c des_crypt.c des_impl.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 xdr_sizeof.c
+diff --git a/src/auth_des.c b/src/auth_des.c
+index 4d3639e..af2f61f 100644
+--- a/src/auth_des.c
++++ b/src/auth_des.c
+@@ -46,8 +46,8 @@
+ #include <rpc/clnt.h>
+ #include <rpc/xdr.h>
+ #include <sys/socket.h>
+-#undef NIS
+-#include <rpcsvc/nis.h>
++
++#include "nis.h"
+ 
+ #if defined(LIBC_SCCS) && !defined(lint)
+ #endif
+diff --git a/src/auth_gss.c b/src/auth_gss.c
+index 9b88c38..5959893 100644
+--- a/src/auth_gss.c
++++ b/src/auth_gss.c
+@@ -526,6 +526,14 @@ _rpc_gss_refresh(AUTH *auth, rpc_gss_options_ret_t *options_ret)
+ 			     gr.gr_major != GSS_S_CONTINUE_NEEDED)) {
+ 				options_ret->major_status = gr.gr_major;
+ 				options_ret->minor_status = gr.gr_minor;
++				if (call_stat != RPC_SUCCESS) {
++					struct rpc_err err;
++					clnt_geterr(gd->clnt, &err);
++					LIBTIRPC_DEBUG(1, ("authgss_refresh: %s errno: %s",
++						clnt_sperrno(call_stat), strerror(err.re_errno)));
++				} else
++					gss_log_status("authgss_refresh:", 
++						gr.gr_major, gr.gr_minor);
+ 				return FALSE;
+ 			}
+ 
+diff --git a/src/auth_time.c b/src/auth_time.c
+index 10e58eb..7f83ab4 100644
+--- a/src/auth_time.c
++++ b/src/auth_time.c
+@@ -44,8 +44,8 @@
+ #include <rpc/rpcb_prot.h>
+ //#include <clnt_soc.h>
+ #include <sys/select.h>
+-#undef NIS
+-#include <rpcsvc/nis.h>
++
++#include "nis.h"
+ 
+ 
+ #ifdef TESTING
+diff --git a/src/clnt_vc.c b/src/clnt_vc.c
+index a72f9f7..a5fbe2f 100644
+--- a/src/clnt_vc.c
++++ b/src/clnt_vc.c
+@@ -72,6 +72,8 @@
+ #define CMGROUP_MAX    16
+ #define SCM_CREDS      0x03            /* process creds (struct cmsgcred) */
+ 
++#undef rpc_createerr                   /* make it clear it is a thread safe variable */
++
+ /*
+  * Credentials structure, used to verify the identity of a peer
+  * process that has sent us a message. This is allocated by the
+@@ -188,10 +190,11 @@ clnt_vc_create(fd, raddr, prog, vers, sendsz, recvsz)
+ 	cl = (CLIENT *)mem_alloc(sizeof (*cl));
+ 	ct = (struct ct_data *)mem_alloc(sizeof (*ct));
+ 	if ((cl == (CLIENT *)NULL) || (ct == (struct ct_data *)NULL)) {
++		struct rpc_createerr *ce = &get_rpc_createerr();
++		ce->cf_stat = RPC_SYSTEMERROR;
++		ce->cf_error.re_errno = errno;
+ 		(void) syslog(LOG_ERR, clnt_vc_errstr,
+ 		    clnt_vc_str, __no_mem_str);
+-		rpc_createerr.cf_stat = RPC_SYSTEMERROR;
+-		rpc_createerr.cf_error.re_errno = errno;
+ 		goto err;
+ 	}
+ 	ct->ct_addr.buf = NULL;
+@@ -230,26 +233,29 @@ clnt_vc_create(fd, raddr, prog, vers, sendsz, recvsz)
+ 		assert(vc_cv != (cond_t *) NULL);
+ 
+ 	/*
+-	 * XXX - fvdl connecting while holding a mutex?
++	 * Do not hold mutex during connect
+ 	 */
++	mutex_unlock(&clnt_fd_lock);
++
+ 	slen = sizeof ss;
+ 	if (getpeername(fd, (struct sockaddr *)&ss, &slen) < 0) {
+ 		if (errno != ENOTCONN) {
+-			rpc_createerr.cf_stat = RPC_SYSTEMERROR;
+-			rpc_createerr.cf_error.re_errno = errno;
+-			mutex_unlock(&clnt_fd_lock);
++			struct rpc_createerr *ce = &get_rpc_createerr();
++			ce->cf_stat = RPC_SYSTEMERROR;
++			ce->cf_error.re_errno = errno;
+ 			thr_sigsetmask(SIG_SETMASK, &(mask), NULL);
+ 			goto err;
+ 		}
+ 		if (connect(fd, (struct sockaddr *)raddr->buf, raddr->len) < 0){
+-			rpc_createerr.cf_stat = RPC_SYSTEMERROR;
+-			rpc_createerr.cf_error.re_errno = errno;
+-			mutex_unlock(&clnt_fd_lock);
+-			thr_sigsetmask(SIG_SETMASK, &(mask), NULL);
+-			goto err;
++			if (errno != EISCONN) {
++				struct rpc_createerr *ce = &get_rpc_createerr();
++				ce->cf_stat = RPC_SYSTEMERROR;
++				ce->cf_error.re_errno = errno;
++				thr_sigsetmask(SIG_SETMASK, &(mask), NULL);
++				goto err;
++			}
+ 		}
+ 	}
+-	mutex_unlock(&clnt_fd_lock);
+ 	if (!__rpc_fd2sockinfo(fd, &si))
+ 		goto err;
+ 	thr_sigsetmask(SIG_SETMASK, &(mask), NULL);
+diff --git a/src/des_impl.c b/src/des_impl.c
+index c5b7ed6..15bec2a 100644
+--- a/src/des_impl.c
++++ b/src/des_impl.c
+@@ -6,7 +6,8 @@
+ /* see <http://www.gnu.org/licenses/> to obtain a copy.  */
+ #include <string.h>
+ #include <stdint.h>
+-#include <rpc/rpc_des.h>
++#include <sys/types.h>
++#include <rpc/des.h>
+ 
+ 
+ static const uint32_t des_SPtrans[8][64] =
+@@ -587,7 +588,7 @@ _des_crypt (char *buf, unsigned len, struct desparams *desp)
+     }
+   tin0 = tin1 = tout0 = tout1 = xor0 = xor1 = 0;
+   tbuf[0] = tbuf[1] = 0;
+-  __bzero (schedule, sizeof (schedule));
++  memset (schedule, 0, sizeof (schedule));
+ 
+   return (1);
+ }
+diff --git a/src/getpublickey.c b/src/getpublickey.c
+index 764a5f9..8cf4dc2 100644
+--- a/src/getpublickey.c
++++ b/src/getpublickey.c
+@@ -38,8 +38,10 @@
+ #include <pwd.h>
+ #include <rpc/rpc.h>
+ #include <rpc/key_prot.h>
++#ifdef YP
+ #include <rpcsvc/yp_prot.h>
+ #include <rpcsvc/ypclnt.h>
++#endif
+ #include <string.h>
+ #include <stdlib.h>
+ 
+diff --git a/src/getrpcport.c b/src/getrpcport.c
+index b452c99..c28cd61 100644
+--- a/src/getrpcport.c
++++ b/src/getrpcport.c
+@@ -57,8 +57,8 @@ getrpcport(host, prognum, versnum, proto)
+ 	memset(&addr, 0, sizeof(addr));
+ 	addr.sin_family = AF_INET;
+ 	addr.sin_port =  0;
+-	if (hp->h_length > sizeof(addr))
+-	  hp->h_length = sizeof(addr);
++	if (hp->h_length > sizeof(addr.sin_addr.s_addr))
++		hp->h_length = sizeof(addr.sin_addr.s_addr);
+ 	memcpy(&addr.sin_addr.s_addr, hp->h_addr, (size_t)hp->h_length);
+ 	/* Inconsistent interfaces need casts! :-( */
+ 	return (pmap_getport(&addr, (u_long)prognum, (u_long)versnum, 
+diff --git a/src/nis.h b/src/nis.h
+new file mode 100644
+index 0000000..588c041
+--- /dev/null
++++ b/src/nis.h
+@@ -0,0 +1,70 @@
++/*
++ * Copyright (c) 2010, Oracle America, Inc.
++ *
++ * Redistribution and use in source and binary forms, with or without
++ * modification, are permitted provided that the following conditions are
++ * met:
++ *
++ *     * Redistributions of source code must retain the above copyright
++ *       notice, this list of conditions and the following disclaimer.
++ *     * Redistributions in binary form must reproduce the above
++ *       copyright notice, this list of conditions and the following
++ *       disclaimer in the documentation and/or other materials
++ *       provided with the distribution.
++ *     * Neither the name of the "Oracle America, Inc." nor the names of its
++ *       contributors may be used to endorse or promote products derived
++ *       from this software without specific prior written permission.
++ *
++ *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
++ *   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
++ *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
++ *   FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
++ *   COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
++ *   INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
++ *   DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
++ *   GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
++ *   INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
++ *   WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
++ *   NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
++ *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
++ */
++
++#ifndef _INTERNAL_NIS_H
++#define _INTERNAL_NIS_H 1
++
++/*  This file only contains the definition of nis_server, to be
++    able to compile libtirpc without the need to have a glibc
++    with sunrpc or a libnsl already installed. */
++
++#define NIS_PK_NONE 0
++
++struct nis_attr {
++	char *zattr_ndx;
++	struct {
++		u_int zattr_val_len;
++		char *zattr_val_val;
++	} zattr_val;
++};
++typedef struct nis_attr nis_attr;
++
++typedef char *nis_name;
++
++struct endpoint {
++	char *uaddr;
++	char *family;
++	char *proto;
++};
++typedef struct endpoint endpoint;
++
++struct nis_server {
++	nis_name name;
++	struct {
++		u_int ep_len;
++		endpoint *ep_val;
++	} ep;
++	uint32_t key_type;
++	netobj pkey;
++};
++typedef struct nis_server nis_server;
++
++#endif /* ! _INTERNAL_NIS_H */
+diff --git a/src/rpc_dtablesize.c b/src/rpc_dtablesize.c
+index 13d320c..3fe503a 100644
+--- a/src/rpc_dtablesize.c
++++ b/src/rpc_dtablesize.c
+@@ -27,22 +27,14 @@
+  */
+ 
+ #include <unistd.h>
+-
+ #include <sys/select.h>
+-
+-int _rpc_dtablesize(void);	/* XXX */
++#include <rpc/clnt.h>
++#include <rpc/rpc_com.h>
+ 
+ /*
+  * Cache the result of getdtablesize(), so we don't have to do an
+  * expensive system call every time.
+  */
+-/*
+- * XXX In FreeBSD 2.x, you can have the maximum number of open file
+- * descriptors be greater than FD_SETSIZE (which us 256 by default).
+- *
+- * Since old programs tend to use this call to determine the first arg
+- * for _select(), having this return > FD_SETSIZE is a Bad Idea(TM)!
+- */
+ int
+ _rpc_dtablesize(void)
+ {
+diff --git a/src/rpc_soc.c b/src/rpc_soc.c
+index 1ec7b3f..ed0892a 100644
+--- a/src/rpc_soc.c
++++ b/src/rpc_soc.c
+@@ -61,8 +61,8 @@
+ #include <string.h>
+ #include <unistd.h>
+ #include <fcntl.h>
+-#include <rpcsvc/nis.h>
+ 
++#include "nis.h"
+ #include "rpc_com.h"
+ 
+ extern mutex_t	rpcsoc_lock;
+diff --git a/src/rtime.c b/src/rtime.c
+index c34e0af..b642840 100644
+--- a/src/rtime.c
++++ b/src/rtime.c
+@@ -46,6 +46,7 @@
+ #include <unistd.h>
+ #include <errno.h>
+ #include <sys/types.h>
++#include <sys/poll.h>
+ #include <sys/socket.h>
+ #include <sys/time.h>
+ #include <netinet/in.h>
+@@ -67,7 +68,8 @@ rtime(addrp, timep, timeout)
+ 	struct timeval *timeout;
+ {
+ 	int s;
+-	fd_set readfds;
++	struct pollfd fd;
++	int milliseconds;
+ 	int res;
+ 	unsigned long thetime;
+ 	struct sockaddr_in from;
+@@ -94,31 +96,32 @@ rtime(addrp, timep, timeout)
+ 	addrp->sin_port = serv->s_port;
+ 
+ 	if (type == SOCK_DGRAM) {
+-		res = sendto(s, (char *)&thetime, sizeof(thetime), 0, 
++		res = sendto(s, (char *)&thetime, sizeof(thetime), 0,
+ 			     (struct sockaddr *)addrp, sizeof(*addrp));
+ 		if (res < 0) {
+ 			do_close(s);
+-			return(-1);	
++			return(-1);
+ 		}
+-		do {
+-			FD_ZERO(&readfds);
+-			FD_SET(s, &readfds);
+-			res = select(_rpc_dtablesize(), &readfds,
+-				     (fd_set *)NULL, (fd_set *)NULL, timeout);
+-		} while (res < 0 && errno == EINTR);
++
++		milliseconds = (timeout->tv_sec * 1000) + (timeout->tv_usec / 1000);
++		fd.fd = s;
++		fd.events = POLLIN;
++		do
++		  res = poll (&fd, 1, milliseconds);
++		while (res < 0 && errno == EINTR);
+ 		if (res <= 0) {
+ 			if (res == 0) {
+ 				errno = ETIMEDOUT;
+ 			}
+ 			do_close(s);
+-			return(-1);	
++			return(-1);
+ 		}
+ 		fromlen = sizeof(from);
+-		res = recvfrom(s, (char *)&thetime, sizeof(thetime), 0, 
++		res = recvfrom(s, (char *)&thetime, sizeof(thetime), 0,
+ 			       (struct sockaddr *)&from, &fromlen);
+ 		do_close(s);
+ 		if (res < 0) {
+-			return(-1);	
++			return(-1);
+ 		}
+ 	} else {
+ 		if (connect(s, (struct sockaddr *)addrp, sizeof(*addrp)) < 0) {
+diff --git a/src/svc.c b/src/svc.c
+index 9c41445..b59467b 100644
+--- a/src/svc.c
++++ b/src/svc.c
+@@ -99,7 +99,7 @@ xprt_register (xprt)
+     {
+       __svc_xports = (SVCXPRT **) calloc (_rpc_dtablesize(), sizeof (SVCXPRT *));
+       if (__svc_xports == NULL)
+-	return;
++            goto unlock;
+     }
+   if (sock < _rpc_dtablesize())
+     {
+@@ -120,14 +120,14 @@ xprt_register (xprt)
+             svc_pollfd[i].fd = sock;
+             svc_pollfd[i].events = (POLLIN | POLLPRI |
+                                     POLLRDNORM | POLLRDBAND);
+-            return;
++            goto unlock;
+           }
+ 
+       new_svc_pollfd = (struct pollfd *) realloc (svc_pollfd,
+                                                   sizeof (struct pollfd)
+                                                   * (svc_max_pollfd + 1));
+       if (new_svc_pollfd == NULL) /* Out of memory */
+-        return;
++        goto unlock;
+       svc_pollfd = new_svc_pollfd;
+       ++svc_max_pollfd;
+ 
+@@ -135,6 +135,7 @@ xprt_register (xprt)
+       svc_pollfd[svc_max_pollfd - 1].events = (POLLIN | POLLPRI |
+                                                POLLRDNORM | POLLRDBAND);
+     }
++unlock:
+   rwlock_unlock (&svc_fd_lock);
+ }
+ 
+diff --git a/src/svc_auth_des.c b/src/svc_auth_des.c
+index 5bc264c..2e90146 100644
+--- a/src/svc_auth_des.c
++++ b/src/svc_auth_des.c
+@@ -86,13 +86,13 @@ static struct cache_entry *authdes_cache/* [AUTHDES_CACHESZ] */;
+ static short *authdes_lru/* [AUTHDES_CACHESZ] */;
+ 
+ static void cache_init();	/* initialize the cache */
+-static short cache_spot();	/* find an entry in the cache */
+-static void cache_ref(/*short sid*/);	/* note that sid was ref'd */
++static short cache_spot(des_block *key, char *name, struct timeval *timestamp);  /* find an entry in the cache */
++static void cache_ref(short sid);	/* note that sid was ref'd */
+ 
+-static void invalidate();	/* invalidate entry in cache */
++static void invalidate(char *cred);	/* invalidate entry in cache */
+ 
+ /*
+- * cache statistics 
++ * cache statistics
+  */
+ static struct {
+ 	u_long ncachehits;	/* times cache hit, and is not replay */
+diff --git a/src/svc_auth_gss.c b/src/svc_auth_gss.c
+index b6aa407..bece46a 100644
+--- a/src/svc_auth_gss.c
++++ b/src/svc_auth_gss.c
+@@ -129,6 +129,8 @@ struct svc_rpc_gss_data {
+ 	((struct svc_rpc_gss_data *)(auth)->svc_ah_private)
+ 
+ /* Global server credentials. */
++static u_int		_svcauth_req_time = 0;
++static gss_OID_set_desc	_svcauth_oid_set = {1, GSS_C_NULL_OID };
+ static gss_cred_id_t	_svcauth_gss_creds;
+ static gss_name_t	_svcauth_gss_name = GSS_C_NO_NAME;
+ static char *		_svcauth_svc_name = NULL;
+@@ -167,6 +169,7 @@ svcauth_gss_import_name(char *service)
+ 	gss_name_t	name;
+ 	gss_buffer_desc	namebuf;
+ 	OM_uint32	maj_stat, min_stat;
++	bool_t		result;
+ 
+ 	gss_log_debug("in svcauth_gss_import_name()");
+ 
+@@ -181,22 +184,21 @@ svcauth_gss_import_name(char *service)
+ 			maj_stat, min_stat);
+ 		return (FALSE);
+ 	}
+-	if (svcauth_gss_set_svc_name(name) != TRUE) {
+-		gss_release_name(&min_stat, &name);
+-		return (FALSE);
+-	}
+-	return (TRUE);
++	result = svcauth_gss_set_svc_name(name);
++	gss_release_name(&min_stat, &name);
++	return result;
+ }
+ 
+ static bool_t
+-svcauth_gss_acquire_cred(u_int req_time, gss_OID_set_desc *oid_set)
++svcauth_gss_acquire_cred(void)
+ {
+ 	OM_uint32	maj_stat, min_stat;
+ 
+ 	gss_log_debug("in svcauth_gss_acquire_cred()");
+ 
+-	maj_stat = gss_acquire_cred(&min_stat, _svcauth_gss_name, req_time,
+-				    oid_set, GSS_C_ACCEPT,
++	maj_stat = gss_acquire_cred(&min_stat, _svcauth_gss_name,
++				    _svcauth_req_time, &_svcauth_oid_set,
++				    GSS_C_ACCEPT,
+ 				    &_svcauth_gss_creds, NULL, NULL);
+ 
+ 	if (maj_stat != GSS_S_COMPLETE) {
+@@ -300,6 +302,8 @@ svcauth_gss_accept_sec_context(struct svc_req *rqst,
+ 					      NULL,
+ 					      &gd->deleg);
+ 
++	xdr_free((xdrproc_t)xdr_rpc_gss_init_args, (caddr_t)&recv_tok);
++
+ 	if (gr->gr_major != GSS_S_COMPLETE &&
+ 	    gr->gr_major != GSS_S_CONTINUE_NEEDED) {
+ 		gss_log_status("svcauth_gss_accept_sec_context: accept_sec_context",
+@@ -352,8 +356,11 @@ svcauth_gss_accept_sec_context(struct svc_req *rqst,
+ 			return (FALSE);
+ 
+ 		rqst->rq_xprt->xp_verf.oa_flavor = RPCSEC_GSS;
+-		rqst->rq_xprt->xp_verf.oa_base = checksum.value;
++		memcpy(rqst->rq_xprt->xp_verf.oa_base, checksum.value,
++			checksum.length);
+ 		rqst->rq_xprt->xp_verf.oa_length = checksum.length;
++
++		gss_release_buffer(&min_stat, &checksum);
+ 	}
+ 	return (TRUE);
+ }
+@@ -435,10 +442,13 @@ svcauth_gss_nextverf(struct svc_req *rqst, u_int num)
+ 			maj_stat, min_stat);
+ 		return (FALSE);
+ 	}
++
+ 	rqst->rq_xprt->xp_verf.oa_flavor = RPCSEC_GSS;
+-	rqst->rq_xprt->xp_verf.oa_base = (caddr_t)checksum.value;
++	memcpy(rqst->rq_xprt->xp_verf.oa_base, checksum.value, checksum.length);
+ 	rqst->rq_xprt->xp_verf.oa_length = (u_int)checksum.length;
+ 
++	gss_release_buffer(&min_stat, &checksum);
++
+ 	return (TRUE);
+ }
+ 
+@@ -568,6 +578,8 @@ _svcauth_gss(struct svc_req *rqst, struct rpc_msg *msg, bool_t *no_dispatch)
+ 	gss_qop_t		 qop;
+ 	struct svcauth_gss_cache_entry **ce;
+ 	time_t			 now;
++	enum auth_stat		 result = AUTH_OK;
++	OM_uint32		 min_stat;
+ 
+ 	gss_log_debug("in svcauth_gss()");
+ 
+@@ -621,19 +633,25 @@ _svcauth_gss(struct svc_req *rqst, struct rpc_msg *msg, bool_t *no_dispatch)
+ 	XDR_DESTROY(&xdrs);
+ 
+ 	/* Check version. */
+-	if (gc->gc_v != RPCSEC_GSS_VERSION)
+-		return (AUTH_BADCRED);
++	if (gc->gc_v != RPCSEC_GSS_VERSION) {
++		result = AUTH_BADCRED;
++		goto out;
++	}
+ 
+ 	/* Check RPCSEC_GSS service. */
+ 	if (gc->gc_svc != RPCSEC_GSS_SVC_NONE &&
+ 	    gc->gc_svc != RPCSEC_GSS_SVC_INTEGRITY &&
+-	    gc->gc_svc != RPCSEC_GSS_SVC_PRIVACY)
+-		return (AUTH_BADCRED);
++	    gc->gc_svc != RPCSEC_GSS_SVC_PRIVACY) {
++		result = AUTH_BADCRED;
++		goto out;
++	}
+ 
+ 	/* Check sequence number. */
+ 	if (gd->established) {
+-		if (gc->gc_seq > MAXSEQ)
+-			return (RPCSEC_GSS_CTXPROBLEM);
++		if (gc->gc_seq > MAXSEQ) {
++			result = RPCSEC_GSS_CTXPROBLEM;
++			goto out;
++		}
+ 
+ 		if ((offset = gd->seqlast - gc->gc_seq) < 0) {
+ 			gd->seqlast = gc->gc_seq;
+@@ -643,7 +661,8 @@ _svcauth_gss(struct svc_req *rqst, struct rpc_msg *msg, bool_t *no_dispatch)
+ 		}
+ 		else if (offset >= gd->win || (gd->seqmask & (1 << offset))) {
+ 			*no_dispatch = 1;
+-			return (RPCSEC_GSS_CTXPROBLEM);
++			result = RPCSEC_GSS_CTXPROBLEM;
++			goto out;
+ 		}
+ 		gd->seq = gc->gc_seq;
+ 		gd->seqmask |= (1 << offset);
+@@ -654,35 +673,52 @@ _svcauth_gss(struct svc_req *rqst, struct rpc_msg *msg, bool_t *no_dispatch)
+ 		rqst->rq_svcname = (char *)gd->ctx;
+ 	}
+ 
++	rqst->rq_xprt->xp_verf.oa_base = msg->rm_call.cb_verf.oa_base;
++
+ 	/* Handle RPCSEC_GSS control procedure. */
+ 	switch (gc->gc_proc) {
+ 
+ 	case RPCSEC_GSS_INIT:
+ 	case RPCSEC_GSS_CONTINUE_INIT:
+-		if (rqst->rq_proc != NULLPROC)
+-			return (AUTH_FAILED);		/* XXX ? */
++		if (rqst->rq_proc != NULLPROC) {
++			result = AUTH_FAILED;		/* XXX ? */
++			break;
++		}
+ 
+ 		if (_svcauth_gss_name == GSS_C_NO_NAME) {
+-			if (!svcauth_gss_import_name("nfs"))
+-				return (AUTH_FAILED);
++			if (!svcauth_gss_import_name("nfs")) {
++				result = AUTH_FAILED;
++				break;
++			}
+ 		}
+ 
+-		if (!svcauth_gss_acquire_cred(0, GSS_C_NULL_OID_SET))
+-			return (AUTH_FAILED);
++		if (!svcauth_gss_acquire_cred()) {
++			result = AUTH_FAILED;
++			break;
++		}
+ 
+-		if (!svcauth_gss_accept_sec_context(rqst, &gr))
+-			return (AUTH_REJECTEDCRED);
++		if (!svcauth_gss_accept_sec_context(rqst, &gr)) {
++			result = AUTH_REJECTEDCRED;
++			break;
++		}
+ 
+-		if (!svcauth_gss_nextverf(rqst, htonl(gr.gr_win)))
+-			return (AUTH_FAILED);
++		if (!svcauth_gss_nextverf(rqst, htonl(gr.gr_win))) {
++			result = AUTH_FAILED;
++			break;
++		}
+ 
+ 		*no_dispatch = TRUE;
+ 
+ 		call_stat = svc_sendreply(rqst->rq_xprt, 
+ 			(xdrproc_t)xdr_rpc_gss_init_res, (caddr_t)&gr);
+ 
+-		if (!call_stat)
+-			return (AUTH_FAILED);
++		gss_release_buffer(&min_stat, &gr.gr_token);
++		free(gr.gr_ctx.value);
++
++		if (!call_stat) {
++			result = AUTH_FAILED;
++			break;
++		}
+ 
+ 		if (gr.gr_major == GSS_S_COMPLETE)
+ 			gd->established = TRUE;
+@@ -690,27 +726,37 @@ _svcauth_gss(struct svc_req *rqst, struct rpc_msg *msg, bool_t *no_dispatch)
+ 		break;
+ 
+ 	case RPCSEC_GSS_DATA:
+-		if (!svcauth_gss_validate(gd, msg, &qop))
+-			return (RPCSEC_GSS_CREDPROBLEM);
++		if (!svcauth_gss_validate(gd, msg, &qop)) {
++			result = RPCSEC_GSS_CREDPROBLEM;
++			break;
++		}
+ 
+-		if (!svcauth_gss_nextverf(rqst, htonl(gc->gc_seq)))
+-			return (AUTH_FAILED);
++		if (!svcauth_gss_nextverf(rqst, htonl(gc->gc_seq))) {
++			result = AUTH_FAILED;
++			break;
++		}
+ 
+ 		if (!gd->callback_done) {
+ 			gd->callback_done = TRUE;
+ 			gd->sec.qop = qop;
+ 			(void)rpc_gss_num_to_qop(gd->rcred.mechanism,
+ 						gd->sec.qop, &gd->rcred.qop);
+-			if (!svcauth_gss_callback(rqst, gd))
+-				return (AUTH_REJECTEDCRED);
++			if (!svcauth_gss_callback(rqst, gd)) {
++				result = AUTH_REJECTEDCRED;
++				break;
++			}
+ 		}
+ 
+ 		if (gd->locked) {
+ 			if (gd->rcred.service !=
+-					_rpc_gss_svc_to_service(gc->gc_svc))
+-				return (AUTH_FAILED);
+-			if (gd->sec.qop != qop)
+-				return (AUTH_BADVERF);
++					_rpc_gss_svc_to_service(gc->gc_svc)) {
++				result = AUTH_FAILED;
++				break;
++			}
++			if (gd->sec.qop != qop) {
++				result = AUTH_BADVERF;
++				break;
++			}
+ 		}
+ 
+ 		if (gd->sec.qop != qop) {
+@@ -724,17 +770,25 @@ _svcauth_gss(struct svc_req *rqst, struct rpc_msg *msg, bool_t *no_dispatch)
+ 		break;
+ 
+ 	case RPCSEC_GSS_DESTROY:
+-		if (rqst->rq_proc != NULLPROC)
+-			return (AUTH_FAILED);		/* XXX ? */
++		if (rqst->rq_proc != NULLPROC) {
++			result = AUTH_FAILED;		/* XXX ? */
++			break;
++		}
+ 
+-		if (!svcauth_gss_validate(gd, msg, &qop))
+-			return (RPCSEC_GSS_CREDPROBLEM);
++		if (!svcauth_gss_validate(gd, msg, &qop)) {
++			result = RPCSEC_GSS_CREDPROBLEM;
++			break;
++		}
+ 
+-		if (!svcauth_gss_nextverf(rqst, htonl(gc->gc_seq)))
+-			return (AUTH_FAILED);
++		if (!svcauth_gss_nextverf(rqst, htonl(gc->gc_seq))) {
++			result = AUTH_FAILED;
++			break;
++		}
+ 
+-		if (!svcauth_gss_release_cred())
+-			return (AUTH_FAILED);
++		if (!svcauth_gss_release_cred()) {
++			result = AUTH_FAILED;
++			break;
++		}
+ 
+ 		SVCAUTH_DESTROY(&SVC_XP_AUTH(rqst->rq_xprt));
+ 		SVC_XP_AUTH(rqst->rq_xprt).svc_ah_ops = svc_auth_none.svc_ah_ops;
+@@ -743,10 +797,12 @@ _svcauth_gss(struct svc_req *rqst, struct rpc_msg *msg, bool_t *no_dispatch)
+ 		break;
+ 
+ 	default:
+-		return (AUTH_REJECTEDCRED);
++		result = AUTH_REJECTEDCRED;
+ 		break;
+ 	}
+-	return (AUTH_OK);
++out:
++	xdr_free((xdrproc_t)xdr_rpc_gss_cred, (caddr_t)gc);
++	return result;
+ }
+ 
+ static bool_t
+@@ -890,7 +946,6 @@ bool_t
+ rpc_gss_set_svc_name(char *principal, char *mechanism, u_int req_time,
+ 		u_int UNUSED(program), u_int UNUSED(version))
+ {
+-	gss_OID_set_desc oid_set;
+ 	rpc_gss_OID oid;
+ 	char *save;
+ 
+@@ -902,14 +957,13 @@ rpc_gss_set_svc_name(char *principal, char *mechanism, u_int req_time,
+ 
+ 	if (!rpc_gss_mech_to_oid(mechanism, &oid))
+ 		goto out_err;
+-	oid_set.count = 1;
+-	oid_set.elements = (gss_OID)oid;
+ 
+ 	if (!svcauth_gss_import_name(principal))
+ 		goto out_err;
+-	if (!svcauth_gss_acquire_cred(req_time, &oid_set))
+-		goto out_err;
+ 
++	_svcauth_req_time = req_time;
++	_svcauth_oid_set.count = 1;
++	_svcauth_oid_set.elements = (gss_OID)oid;
+ 	free(_svcauth_svc_name);
+ 	_svcauth_svc_name = save;
+ 	return TRUE;
+diff --git a/src/svc_vc.c b/src/svc_vc.c
+index 6ae613d..97a76a3 100644
+--- a/src/svc_vc.c
++++ b/src/svc_vc.c
+@@ -270,14 +270,8 @@ makefd_xprt(fd, sendsize, recvsize)
+ 	struct cf_conn *cd;
+ 	const char *netid;
+ 	struct __rpc_sockinfo si;
+- 
+-	assert(fd != -1);
+ 
+-        if (fd >= FD_SETSIZE) {
+-                warnx("svc_vc: makefd_xprt: fd too high\n");
+-                xprt = NULL;
+-                goto done;
+-        }
++	assert(fd != -1);
+ 
+ 	xprt = mem_alloc(sizeof(SVCXPRT));
+ 	if (xprt == NULL) {
+@@ -338,22 +332,10 @@ rendezvous_request(xprt, msg)
+ 	r = (struct cf_rendezvous *)xprt->xp_p1;
+ again:
+ 	len = sizeof addr;
+-	if ((sock = accept(xprt->xp_fd, (struct sockaddr *)(void *)&addr,
+-	    &len)) < 0) {
++	sock = accept(xprt->xp_fd, (struct sockaddr *)(void *)&addr, &len);
++	if (sock < 0) {
+ 		if (errno == EINTR)
+ 			goto again;
+-
+-		if (errno == EMFILE || errno == ENFILE) {
+-		  /* If there are no file descriptors available, then accept will fail.
+-		     We want to delay here so the connection request can be dequeued;
+-		     otherwise we can bounce between polling and accepting, never
+-		     giving the request a chance to dequeue and eating an enormous
+-		     amount of cpu time in svc_run if we're polling on many file
+-		     descriptors.  */
+-		        struct timespec ts = { .tv_sec = 0, .tv_nsec = 50000000 };
+-                        nanosleep (&ts, NULL);
+-			goto again;
+-		}
+ 		return (FALSE);
+ 	}
+ 	/*
+diff --git a/tirpc/rpc/des.h b/tirpc/rpc/des.h
+index d2881ad..018aa48 100644
+--- a/tirpc/rpc/des.h
++++ b/tirpc/rpc/des.h
+@@ -82,6 +82,6 @@ struct desparams {
+ /*
+  * Software DES.
+  */
+-extern int _des_crypt( char *, int, struct desparams * );
++extern int _des_crypt( char *, unsigned, struct desparams * );
+ 
+ #endif
+diff --git a/tirpc/rpc/rpcent.h b/tirpc/rpc/rpcent.h
+index 147f909..e07503c 100644
+--- a/tirpc/rpc/rpcent.h
++++ b/tirpc/rpc/rpcent.h
+@@ -60,10 +60,11 @@ struct rpcent {
+ extern struct rpcent *getrpcbyname(const char *);
+ extern struct rpcent *getrpcbynumber(int);
+ extern struct rpcent *getrpcent(void);
+-#endif
+ 
+ extern void setrpcent(int);
+ extern void endrpcent(void);
++#endif
++
+ #ifdef __cplusplus
+ }
+ #endif

diff --git a/net-libs/libtirpc/libtirpc-0.2.5-r99.ebuild b/net-libs/libtirpc/libtirpc-0.2.5.ebuild
similarity index 92%
copy from net-libs/libtirpc/libtirpc-0.2.5-r99.ebuild
copy to net-libs/libtirpc/libtirpc-0.2.5.ebuild
index c053676..2e825c4 100644
--- a/net-libs/libtirpc/libtirpc-0.2.5-r99.ebuild
+++ b/net-libs/libtirpc/libtirpc-0.2.5.ebuild
@@ -1,6 +1,5 @@
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2015 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Id$
 
 EAPI="4"
 
@@ -13,7 +12,7 @@ SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2
 
 LICENSE="GPL-2"
 SLOT="0"
-KEYWORDS="amd64 arm ~mips ppc x86"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~mips ppc ppc64 s390 sh sparc x86"
 IUSE="ipv6 kerberos static-libs"
 
 RDEPEND="kerberos? ( >=virtual/krb5-0-r1[${MULTILIB_USEDEP}] )"
@@ -56,7 +55,7 @@ multilib_src_install() {
 	default
 
 	# libtirpc replaces rpc support in glibc, so we need it in /
-	multilib_is_native_abi && gen_usr_ldscript -a tirpc
+	gen_usr_ldscript -a tirpc
 }
 
 multilib_src_install_all() {

diff --git a/net-libs/libtirpc/libtirpc-0.2.5-r99.ebuild b/net-libs/libtirpc/libtirpc-1.0.1.ebuild
similarity index 58%
rename from net-libs/libtirpc/libtirpc-0.2.5-r99.ebuild
rename to net-libs/libtirpc/libtirpc-1.0.1.ebuild
index c053676..ea2fc47 100644
--- a/net-libs/libtirpc/libtirpc-0.2.5-r99.ebuild
+++ b/net-libs/libtirpc/libtirpc-1.0.1.ebuild
@@ -1,10 +1,9 @@
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Id$
 
-EAPI="4"
+EAPI="5"
 
-inherit multilib-minimal toolchain-funcs autotools
+inherit multilib-minimal toolchain-funcs
 
 DESCRIPTION="Transport Independent RPC library (SunRPC replacement)"
 HOMEPAGE="http://libtirpc.sourceforge.net/"
@@ -12,19 +11,14 @@ SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2
 	mirror://gentoo/${PN}-glibc-nfs.tar.xz"
 
 LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="amd64 arm ~mips ppc x86"
+SLOT="0/3" # subslot matches SONAME major
+KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86"
 IUSE="ipv6 kerberos static-libs"
 
 RDEPEND="kerberos? ( >=virtual/krb5-0-r1[${MULTILIB_USEDEP}] )"
 DEPEND="${RDEPEND}
 	app-arch/xz-utils
 	>=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}]"
-RDEPEND="${RDEPEND}
-	abi_x86_32? (
-		!<=app-emulation/emul-linux-x86-baselibs-20140508-r7
-		!app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
-	)"
 
 src_unpack() {
 	unpack ${A}
@@ -32,16 +26,9 @@ src_unpack() {
 }
 
 src_prepare() {
-	epatch "${FILESDIR}"/${P}-stdarg.patch
-	epatch "${FILESDIR}"/0001-Provide-getrpcbynumber-and-getrpcbyname-if-those-are.patch
-	epatch "${FILESDIR}"/0002-Misc-header-fixes.patch
-	epatch "${FILESDIR}"/0003-fix_cdefs_h_include.patch
-	epatch "${FILESDIR}"/0004-fix_DECLS.patch
-	epatch "${FILESDIR}"/0005-fix_remaining_issues.patch
-	epatch "${FILESDIR}"/0006-fix_queue_h_include.patch
-	epatch "${FILESDIR}"/0007-no-des.patch
-	eautoconf
-	eautoreconf
+	default
+	# Musl fixes
+	epatch "${FILESDIR}"/git.patch
 }
 
 multilib_src_configure() {
@@ -56,7 +43,7 @@ multilib_src_install() {
 	default
 
 	# libtirpc replaces rpc support in glibc, so we need it in /
-	multilib_is_native_abi && gen_usr_ldscript -a tirpc
+	gen_usr_ldscript -a tirpc
 }
 
 multilib_src_install_all() {


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] proj/musl:master commit in: net-libs/libtirpc/, net-libs/libtirpc/files/
@ 2017-04-03  1:35 Aric Belsito
  0 siblings, 0 replies; 6+ messages in thread
From: Aric Belsito @ 2017-04-03  1:35 UTC (permalink / raw
  To: gentoo-commits

commit:     bd3c89b549253cc5b1ac0675b07ef6cef4d330eb
Author:     Aric Belsito <lluixhi <AT> gmail <DOT> com>
AuthorDate: Mon Apr  3 01:35:06 2017 +0000
Commit:     Aric Belsito <lluixhi <AT> gmail <DOT> com>
CommitDate: Mon Apr  3 01:35:06 2017 +0000
URL:        https://gitweb.gentoo.org/proj/musl.git/commit/?id=bd3c89b5

net-libs/libtirpc: depend on sys-libs/queue

 net-libs/libtirpc/Manifest                         |  5 +--
 .../libtirpc/files/0006-fix_queue_h_include.patch  | 44 ----------------------
 net-libs/libtirpc/libtirpc-0.2.5.ebuild            |  2 +-
 net-libs/libtirpc/libtirpc-1.0.1.ebuild            |  2 +-
 4 files changed, 4 insertions(+), 49 deletions(-)

diff --git a/net-libs/libtirpc/Manifest b/net-libs/libtirpc/Manifest
index 6a9ecd0..f48dcc0 100644
--- a/net-libs/libtirpc/Manifest
+++ b/net-libs/libtirpc/Manifest
@@ -3,13 +3,12 @@ AUX 0002-Misc-header-fixes.patch 1074 SHA256 519dd9015db2505404118e0067c7cbfec22
 AUX 0003-fix_cdefs_h_include.patch 15313 SHA256 c5bae800d887a08eba89d817b6cc19c4337b14e53f2ce8e9fb7e9984dbfe4168 SHA512 cf686acda95f8ccca486b518ee2ada42a443b3cc524bf4374b770612f501e0f2a75c61c8586a9d490ce3ee1e373559cf72c380d9fa99a75d0037b74e35fa3647 WHIRLPOOL 12915a1d45649695198c20bd609681f640bdbf3a1b40554d051e6a07534b7889a4676990edab90605571f0bc2caaebae074f3c6ec9ef88304c597acd0580b7a8
 AUX 0004-fix_DECLS.patch 29124 SHA256 bdc844c56cfe2d5b060d59fee009576895504e2df492423ddaedd9915c785650 SHA512 8d0efe87a0e8444dd10d4b63430dfd038a7591a0a1e54bc539a4023c7421a89caae1c811d6a2ed4e33fd4d0beebd48c11fc28b5de41dbedf0c1e0fbeb8885cf3 WHIRLPOOL 5ec477f9dfb79a53b2689dea6e158c42437f0c15e18f0eebd3aede63e59b1191974fd913b26db352feb84d468dd7770e102510022ae2b017aa634f0e9e335a27
 AUX 0005-fix_remaining_issues.patch 373 SHA256 db061da4e22c4ed9192587a622454e69c6999b5ccfdafa5588957440051277e2 SHA512 db70a64424904a669534e25c70b13dffb0ddd3437e81f6fee69ac2399e00bdd4e83ee9c65bc0bb789e28c1ac8e030a22461642e699fd371a4f147782a5845912 WHIRLPOOL 06e9f643c66867ddf965427e5c874eaa3c4275b961634d3fc669120275e3db8613a9bd997d612976c078584e016234f34e5a4abfeef20eb655997c7825e8cb56
-AUX 0006-fix_queue_h_include.patch 1788 SHA256 3b8f296eb375052210874ebc3caeadd0cdf689a27e279761e16d76b411e89f8f SHA512 f5a419d883dc6fc0bc6ebb02c3b1f7ce95aeb2b261eb5a49498b600844a27041b32f146fd8bba3d1769c32a67a15b9e40d9ffe3598d9448ebfc4fde6446e69aa WHIRLPOOL 1e7b71255a11abd45dc88b74d8d8146f60c0a621ebe42f437e45e01f791a0ca020c27f841091f556d33fd284336b2e8cc8fa91fa9ca9ed5dd5904c1a5fe82212
 AUX 0007-no-des.patch 960 SHA256 12823f030b803045108df782018d04ca253d4439b0e92015ddb140dcd33c1be3 SHA512 95ad086657d008a01a4072ba7141391cbbe8ac35372b2f063a3f9774eb5dfa12b97bcff0c1b6da2d887001beaa60a8524823df93a8de2fdb73ad2a30340770ba WHIRLPOOL bd075834fddeff5ae86b90273f5c7b820f88649045e65b63d09dc26c35ada0fd1162dcf8aeb1cd82ad59b9092eceb92e154fa58c9beca540dc31ead7cc96b72e
 AUX git.patch 24736 SHA256 0a62de190d38660efff0ddbb73b5b6315fdc015c20cf9c235e35c0cf7eeb0e85 SHA512 4dd540470e9a25b5df0ea2c883dd647f26b71ed82e880c7efa4eed51dd98b898e18964a3ee998ceeadf39caed0a661f110f72157ec70584e33131d0a0f375a00 WHIRLPOOL 3b7fe2207ea84b56ce889778c4ef31669afe7dd340270063c1ac09accc3459e4d53bd5d084bfa090ec041fb188cd8bac6aad55d7fd60f43e485c89d53e06b14e
 AUX libtirpc-0.2.5-stdarg.patch 667 SHA256 2b31b1148af9d96c9a9e6f609c0b5b03424954d6251c18d64b6119afd8afa6f7 SHA512 2197f8c2ed3b4dbfc54ee37e973a6e275d19c6dde5d066b9ce45beecdbb17c9e620d7c6f0997b7ebfeb2bd1741327028a793b34edd94d59a89c8b36ac102b025 WHIRLPOOL 90d4e88c18f0d93ab8dfef4981377c2a6df42ff90b70049d07e203e7b66a5087910fe501cf9e1b93782eb25a8b3a8680c03287ccc563b838f517e5d1524b12c5
 DIST libtirpc-0.2.5.tar.bz2 459094 SHA256 62f9de7c2c8686c568757730e1fef66502a0e00d6cacf33546d0267984e002db SHA512 9f8afa1acb04a2c2c558018f2528f8caaa79994a2af2abeed947f914145872ef72988b241e11925c799db0de9ec51fd9baecd2b08150240b22f91e2e55a45194 WHIRLPOOL a2b4f1c4825f2b774c2290cccd9d552bb7566ec9eb5988d3ab619d7870a907600f67e7af39fbc3e245606db8534f114c990145789c383206d3a9cf96cf043d8c
 DIST libtirpc-1.0.1.tar.bz2 495125 SHA256 5156974f31be7ccbc8ab1de37c4739af6d9d42c87b1d5caf4835dda75fcbb89e SHA512 c9b449e737bc2bd3d56e31e8352f312e89a7ec2a11b73b5ac314e7d82d3b644c611e422b623912453b67b668f86a6de7bb7f18c9495dd15de8e2798ec2ff41c8 WHIRLPOOL cce6a4e69bd634b40d66594a81c23d2044b63eec16d6c96d6fcfaa7f2ca41fb9af99c8e2b964ec12be82682afa4090b218d7e14399fdfc9b32df6c2234bc3c9e
 DIST libtirpc-glibc-nfs.tar.xz 8948 SHA256 2677cfedf626f3f5a8f6e507aed5bb8f79a7453b589d684dbbc086e755170d83 SHA512 90255bf0a27af16164e0710dd940778609925d473f4343093ff19d98cc4f23023788bf4edf0178eae1961afc0ba8b69b273de95b7d7e2afdb706701d8ba6f7ba WHIRLPOOL 06bcf3fd4e424a86071e5c4ddeb89aa571c862e765aae9382d9f9a55ab72cd1c623490555c1a9bd3380a2d04ecb10fb47a75a7dddf449d4368a1a01617226858
-EBUILD libtirpc-0.2.5.ebuild 1920 SHA256 787410d5dfb2794a29c607fd47db15230d42050eabd9ddc57efe86486e31c64b SHA512 b9fbd63c6356a0d3e5f3a7d3b40727baa5039175d664cb14f49601c845d70767bd2bbd848b50541275e645cf7eb64b4ddab98475c0cf327d41992f92cd588b88 WHIRLPOOL 523e39ae954a6477a84382df171cab339e4be5b5dcb8db21150691b0b0cff13484e69d45256c7a15947a09d7f1b7fab9a37b58a8a22857fe3c53115e091af596
-EBUILD libtirpc-1.0.1.ebuild 1459 SHA256 07111cf5c1d83335cf63924f1941b0688cc29cc80ea52a6dcb06f7c9cbffaf4b SHA512 8f0d4bab27059aa93762cfcecf288cc6e8dd4551c29d8f486f227a4e64d4f689e81a8ff0e993708d4af79c028f10c1761210cf23f171e0d0b6864305abf486bf WHIRLPOOL 1d0b4c9b6ad4f3efec3955bb9cd43cd87dda29ddce8bae28e1398a462e0dedc33932045a607253c2a583554c74dc203943d09e9876475071660386f63ae2d432
+EBUILD libtirpc-0.2.5.ebuild 1899 SHA256 3623a04c9092a9a6dd668d70ac741ee55aeeab2c6d757e2c053bc78b833f3e97 SHA512 f25fe58b1d5aaa510350199d4ad7dc5d2956aaa35989a25da88215e9a9d446819b7e6ca788fef989892130cd1ee4baae68d87d6d6d7fd59596e4c6d484d53aa1 WHIRLPOOL 4da3882bee772b029e95fe3bc6c94f7e9cd30ff47cfd8e6537494e74e9423d4d8fd9e7248f1c019042812fe75d086ae4fb24f3531b146b0b8dd91ad547c7d295
+EBUILD libtirpc-1.0.1.ebuild 1438 SHA256 0f072addbde3ed907efd658759cb39cf61769760ef13f9d08cb4e24e0a12422f SHA512 b98ac6adaf451cad9e9bb5376ccf44e6386d9b2949786258c11871315a18fb8f0c03b1473e00c78f44e8b671c0825807dde98d0b643f5dcbca6ee6c1127731bd WHIRLPOOL 74b7d1382ae2fc5f90e17e43e5b99954402b856b28f209973b0a5c76ea99d4eeafcc5b06e210745f56e6ebbbc3b606af0ffcd7d522d110b28e88d8ad8bc88f25
 MISC metadata.xml 335 SHA256 02e9487e791e2d6aa99e74025dd90a6c54d86c73d530c96316e93f7552e1439a SHA512 d6dd857293827907e545dc6e8631d06682d20e13442f8ce6cbd2e2a789d885c8a788f4ed1d062a8c54c4165d22eb096279d4c2f598e462a57faaf8bec1e9777b WHIRLPOOL 6a802fc6b1fdd5bc815c4d2d41de0cba5cff351cdd1fa80021c02233b3facf21674d94ec7b822c2d514e5e1c721cf3ae2b88c885afdce8a7b60d2e63da71183c

diff --git a/net-libs/libtirpc/files/0006-fix_queue_h_include.patch b/net-libs/libtirpc/files/0006-fix_queue_h_include.patch
deleted file mode 100644
index 9db410c..0000000
--- a/net-libs/libtirpc/files/0006-fix_queue_h_include.patch
+++ /dev/null
@@ -1,44 +0,0 @@
---- src/clnt_bcast.c.orig	2014-11-28 09:31:22.462289976 +0000
-+++ src/clnt_bcast.c	2014-11-28 09:34:06.588289976 +0000
-@@ -43,8 +43,41 @@
-  */
- #include <sys/socket.h>
- #include <sys/types.h>
-+#ifdef __GLIBC__
- #include <sys/queue.h>
-+#else
-+/*
-+ *  * Tail queue definitions.
-+ *   */
-+#define _TAILQ_HEAD(name, type, qual)                                   \
-+struct name {                                                           \
-+       qual type *tqh_first;           /* first element */             \
-+       qual type *qual *tqh_last;      /* addr of last next element */ \
-+}
-+#define TAILQ_HEAD(name, type)  _TAILQ_HEAD(name, struct type,)
- 
-+#define _TAILQ_ENTRY(type, qual)                                        \
-+struct {                                                                \
-+       qual type *tqe_next;            /* next element */              \
-+       qual type *qual *tqe_prev;      /* address of previous next element */\
-+}
-+#define TAILQ_ENTRY(type)       _TAILQ_ENTRY(struct type,)
-+/*
-+ *  * Tail queue functions.
-+ *   */
-+#define TAILQ_INIT(head) do {                                           \
-+       (head)->tqh_first = NULL;                                       \
-+       (head)->tqh_last = &(head)->tqh_first;                          \
-+} while (/*CONSTCOND*/0)
-+
-+#define TAILQ_INSERT_TAIL(head, elm, field) do {                        \
-+       (elm)->field.tqe_next = NULL;                                   \
-+       (elm)->field.tqe_prev = (head)->tqh_last;                       \
-+       *(head)->tqh_last = (elm);                                      \
-+       (head)->tqh_last = &(elm)->field.tqe_next;                      \
-+} while (/*CONSTCOND*/0)
-+
-+#endif
- #include <net/if.h>
- #include <netinet/in.h>
- #include <ifaddrs.h>

diff --git a/net-libs/libtirpc/libtirpc-0.2.5.ebuild b/net-libs/libtirpc/libtirpc-0.2.5.ebuild
index 2e825c4..fa28963 100644
--- a/net-libs/libtirpc/libtirpc-0.2.5.ebuild
+++ b/net-libs/libtirpc/libtirpc-0.2.5.ebuild
@@ -17,6 +17,7 @@ IUSE="ipv6 kerberos static-libs"
 
 RDEPEND="kerberos? ( >=virtual/krb5-0-r1[${MULTILIB_USEDEP}] )"
 DEPEND="${RDEPEND}
+	elibc_musl? ( sys-libs/queue )
 	app-arch/xz-utils
 	>=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}]"
 RDEPEND="${RDEPEND}
@@ -37,7 +38,6 @@ src_prepare() {
 	epatch "${FILESDIR}"/0003-fix_cdefs_h_include.patch
 	epatch "${FILESDIR}"/0004-fix_DECLS.patch
 	epatch "${FILESDIR}"/0005-fix_remaining_issues.patch
-	epatch "${FILESDIR}"/0006-fix_queue_h_include.patch
 	epatch "${FILESDIR}"/0007-no-des.patch
 	eautoconf
 	eautoreconf

diff --git a/net-libs/libtirpc/libtirpc-1.0.1.ebuild b/net-libs/libtirpc/libtirpc-1.0.1.ebuild
index 49e0966..d6c00b0 100644
--- a/net-libs/libtirpc/libtirpc-1.0.1.ebuild
+++ b/net-libs/libtirpc/libtirpc-1.0.1.ebuild
@@ -17,6 +17,7 @@ IUSE="ipv6 kerberos static-libs"
 
 RDEPEND="kerberos? ( >=virtual/krb5-0-r1[${MULTILIB_USEDEP}] )"
 DEPEND="${RDEPEND}
+	elibc_musl? ( sys-libs/queue )
 	app-arch/xz-utils
 	>=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}]"
 
@@ -28,7 +29,6 @@ src_unpack() {
 src_prepare() {
 	default
 	# Musl fixes
-	epatch "${FILESDIR}"/0006-fix_queue_h_include.patch
 	epatch "${FILESDIR}"/git.patch
 }
 


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] proj/musl:master commit in: net-libs/libtirpc/, net-libs/libtirpc/files/
@ 2017-05-08 21:07 Aric Belsito
  0 siblings, 0 replies; 6+ messages in thread
From: Aric Belsito @ 2017-05-08 21:07 UTC (permalink / raw
  To: gentoo-commits

commit:     d482897e20f7c842097dc0cc9fb625dc0b60ed73
Author:     Aric Belsito <lluixhi <AT> gmail <DOT> com>
AuthorDate: Mon May  8 21:07:27 2017 +0000
Commit:     Aric Belsito <lluixhi <AT> gmail <DOT> com>
CommitDate: Mon May  8 21:07:27 2017 +0000
URL:        https://gitweb.gentoo.org/proj/musl.git/commit/?id=d482897e

net-libs/libtirpc add patch

 net-libs/libtirpc/Manifest                         |   1 +
 .../files/libtirpc-1.0.1-CVE-2017-8779.patch       | 255 +++++++++++++++++++++
 2 files changed, 256 insertions(+)

diff --git a/net-libs/libtirpc/Manifest b/net-libs/libtirpc/Manifest
index ca48538..b1e5bd4 100644
--- a/net-libs/libtirpc/Manifest
+++ b/net-libs/libtirpc/Manifest
@@ -6,6 +6,7 @@ AUX 0005-fix_remaining_issues.patch 373 SHA256 db061da4e22c4ed9192587a622454e69c
 AUX 0007-no-des.patch 960 SHA256 12823f030b803045108df782018d04ca253d4439b0e92015ddb140dcd33c1be3 SHA512 95ad086657d008a01a4072ba7141391cbbe8ac35372b2f063a3f9774eb5dfa12b97bcff0c1b6da2d887001beaa60a8524823df93a8de2fdb73ad2a30340770ba WHIRLPOOL bd075834fddeff5ae86b90273f5c7b820f88649045e65b63d09dc26c35ada0fd1162dcf8aeb1cd82ad59b9092eceb92e154fa58c9beca540dc31ead7cc96b72e
 AUX git.patch 24736 SHA256 0a62de190d38660efff0ddbb73b5b6315fdc015c20cf9c235e35c0cf7eeb0e85 SHA512 4dd540470e9a25b5df0ea2c883dd647f26b71ed82e880c7efa4eed51dd98b898e18964a3ee998ceeadf39caed0a661f110f72157ec70584e33131d0a0f375a00 WHIRLPOOL 3b7fe2207ea84b56ce889778c4ef31669afe7dd340270063c1ac09accc3459e4d53bd5d084bfa090ec041fb188cd8bac6aad55d7fd60f43e485c89d53e06b14e
 AUX libtirpc-0.2.5-stdarg.patch 667 SHA256 2b31b1148af9d96c9a9e6f609c0b5b03424954d6251c18d64b6119afd8afa6f7 SHA512 2197f8c2ed3b4dbfc54ee37e973a6e275d19c6dde5d066b9ce45beecdbb17c9e620d7c6f0997b7ebfeb2bd1741327028a793b34edd94d59a89c8b36ac102b025 WHIRLPOOL 90d4e88c18f0d93ab8dfef4981377c2a6df42ff90b70049d07e203e7b66a5087910fe501cf9e1b93782eb25a8b3a8680c03287ccc563b838f517e5d1524b12c5
+AUX libtirpc-1.0.1-CVE-2017-8779.patch 7032 SHA256 091d3ff2b53a3ef9b20c61af19192434f652e528070fd57c706bce2988de0279 SHA512 b7c97f6f202cd57c988ff026e2805011942f470c71fdfd81a2647a0e197386db937b022f0056e6ad106bb143c36323835748965b4915a293b89efba3cd171c84 WHIRLPOOL 44f65f1fadec76e742641a3ec7c22f90f54309c3b9e6f1076b2de1dd14aaf0012c323d3c92599775b43446405253cf1375d9c4c3d5bf26d8de1224b42a552ead
 DIST libtirpc-0.2.5.tar.bz2 459094 SHA256 62f9de7c2c8686c568757730e1fef66502a0e00d6cacf33546d0267984e002db SHA512 9f8afa1acb04a2c2c558018f2528f8caaa79994a2af2abeed947f914145872ef72988b241e11925c799db0de9ec51fd9baecd2b08150240b22f91e2e55a45194 WHIRLPOOL a2b4f1c4825f2b774c2290cccd9d552bb7566ec9eb5988d3ab619d7870a907600f67e7af39fbc3e245606db8534f114c990145789c383206d3a9cf96cf043d8c
 DIST libtirpc-1.0.1.tar.bz2 495125 SHA256 5156974f31be7ccbc8ab1de37c4739af6d9d42c87b1d5caf4835dda75fcbb89e SHA512 c9b449e737bc2bd3d56e31e8352f312e89a7ec2a11b73b5ac314e7d82d3b644c611e422b623912453b67b668f86a6de7bb7f18c9495dd15de8e2798ec2ff41c8 WHIRLPOOL cce6a4e69bd634b40d66594a81c23d2044b63eec16d6c96d6fcfaa7f2ca41fb9af99c8e2b964ec12be82682afa4090b218d7e14399fdfc9b32df6c2234bc3c9e
 DIST libtirpc-glibc-nfs.tar.xz 8948 SHA256 2677cfedf626f3f5a8f6e507aed5bb8f79a7453b589d684dbbc086e755170d83 SHA512 90255bf0a27af16164e0710dd940778609925d473f4343093ff19d98cc4f23023788bf4edf0178eae1961afc0ba8b69b273de95b7d7e2afdb706701d8ba6f7ba WHIRLPOOL 06bcf3fd4e424a86071e5c4ddeb89aa571c862e765aae9382d9f9a55ab72cd1c623490555c1a9bd3380a2d04ecb10fb47a75a7dddf449d4368a1a01617226858

diff --git a/net-libs/libtirpc/files/libtirpc-1.0.1-CVE-2017-8779.patch b/net-libs/libtirpc/files/libtirpc-1.0.1-CVE-2017-8779.patch
new file mode 100644
index 0000000..91a50fa
--- /dev/null
+++ b/net-libs/libtirpc/files/libtirpc-1.0.1-CVE-2017-8779.patch
@@ -0,0 +1,255 @@
+diff --git a/src/rpc_generic.c b/src/rpc_generic.c
+index 2f09a8f..589cbd5 100644
+--- a/src/rpc_generic.c
++++ b/src/rpc_generic.c
+@@ -615,6 +615,9 @@ __rpc_taddr2uaddr_af(int af, const struct netbuf *nbuf)
+ 
+ 	switch (af) {
+ 	case AF_INET:
++		if (nbuf->len < sizeof(*sin)) {
++			return NULL;
++		}
+ 		sin = nbuf->buf;
+ 		if (inet_ntop(af, &sin->sin_addr, namebuf, sizeof namebuf)
+ 		    == NULL)
+@@ -626,6 +629,9 @@ __rpc_taddr2uaddr_af(int af, const struct netbuf *nbuf)
+ 		break;
+ #ifdef INET6
+ 	case AF_INET6:
++		if (nbuf->len < sizeof(*sin6)) {
++			return NULL;
++		}
+ 		sin6 = nbuf->buf;
+ 		if (inet_ntop(af, &sin6->sin6_addr, namebuf6, sizeof namebuf6)
+ 		    == NULL)
+@@ -667,6 +673,8 @@ __rpc_uaddr2taddr_af(int af, const char *uaddr)
+ 
+ 	port = 0;
+ 	sin = NULL;
++	if (uaddr == NULL)
++		return NULL;
+ 	addrstr = strdup(uaddr);
+ 	if (addrstr == NULL)
+ 		return NULL;
+diff --git a/src/rpcb_prot.c b/src/rpcb_prot.c
+index 43fd385..a923c8e 100644
+--- a/src/rpcb_prot.c
++++ b/src/rpcb_prot.c
+@@ -41,6 +41,7 @@
+ #include <rpc/types.h>
+ #include <rpc/xdr.h>
+ #include <rpc/rpcb_prot.h>
++#include "rpc_com.h"
+ 
+ bool_t
+ xdr_rpcb(xdrs, objp)
+@@ -53,13 +54,13 @@ xdr_rpcb(xdrs, objp)
+ 	if (!xdr_u_int32_t(xdrs, &objp->r_vers)) {
+ 		return (FALSE);
+ 	}
+-	if (!xdr_string(xdrs, &objp->r_netid, (u_int)~0)) {
++	if (!xdr_string(xdrs, &objp->r_netid, RPC_MAXDATASIZE)) {
+ 		return (FALSE);
+ 	}
+-	if (!xdr_string(xdrs, &objp->r_addr, (u_int)~0)) {
++	if (!xdr_string(xdrs, &objp->r_addr, RPC_MAXDATASIZE)) {
+ 		return (FALSE);
+ 	}
+-	if (!xdr_string(xdrs, &objp->r_owner, (u_int)~0)) {
++	if (!xdr_string(xdrs, &objp->r_owner, RPC_MAXDATASIZE)) {
+ 		return (FALSE);
+ 	}
+ 	return (TRUE);
+@@ -159,19 +160,19 @@ xdr_rpcb_entry(xdrs, objp)
+ 	XDR *xdrs;
+ 	rpcb_entry *objp;
+ {
+-	if (!xdr_string(xdrs, &objp->r_maddr, (u_int)~0)) {
++	if (!xdr_string(xdrs, &objp->r_maddr, RPC_MAXDATASIZE)) {
+ 		return (FALSE);
+ 	}
+-	if (!xdr_string(xdrs, &objp->r_nc_netid, (u_int)~0)) {
++	if (!xdr_string(xdrs, &objp->r_nc_netid, RPC_MAXDATASIZE)) {
+ 		return (FALSE);
+ 	}
+ 	if (!xdr_u_int32_t(xdrs, &objp->r_nc_semantics)) {
+ 		return (FALSE);
+ 	}
+-	if (!xdr_string(xdrs, &objp->r_nc_protofmly, (u_int)~0)) {
++	if (!xdr_string(xdrs, &objp->r_nc_protofmly, RPC_MAXDATASIZE)) {
+ 		return (FALSE);
+ 	}
+-	if (!xdr_string(xdrs, &objp->r_nc_proto, (u_int)~0)) {
++	if (!xdr_string(xdrs, &objp->r_nc_proto, RPC_MAXDATASIZE)) {
+ 		return (FALSE);
+ 	}
+ 	return (TRUE);
+@@ -292,7 +293,7 @@ xdr_rpcb_rmtcallres(xdrs, p)
+ 	bool_t dummy;
+ 	struct r_rpcb_rmtcallres *objp = (struct r_rpcb_rmtcallres *)(void *)p;
+ 
+-	if (!xdr_string(xdrs, &objp->addr, (u_int)~0)) {
++	if (!xdr_string(xdrs, &objp->addr, RPC_MAXDATASIZE)) {
+ 		return (FALSE);
+ 	}
+ 	if (!xdr_u_int(xdrs, &objp->results.results_len)) {
+@@ -312,6 +313,11 @@ xdr_netbuf(xdrs, objp)
+ 	if (!xdr_u_int32_t(xdrs, (u_int32_t *) &objp->maxlen)) {
+ 		return (FALSE);
+ 	}
++
++	if (objp->maxlen > RPC_MAXDATASIZE) {
++		return (FALSE);
++	}
++
+ 	dummy = xdr_bytes(xdrs, (char **)&(objp->buf),
+ 			(u_int *)&(objp->len), objp->maxlen);
+ 	return (dummy);
+diff --git a/src/rpcb_st_xdr.c b/src/rpcb_st_xdr.c
+index 08db745..28e6a48 100644
+--- a/src/rpcb_st_xdr.c
++++ b/src/rpcb_st_xdr.c
+@@ -37,6 +37,7 @@
+ 
+ 
+ #include <rpc/rpc.h>
++#include "rpc_com.h"
+ 
+ /* Link list of all the stats about getport and getaddr */
+ 
+@@ -58,7 +59,7 @@ xdr_rpcbs_addrlist(xdrs, objp)
+ 	    if (!xdr_int(xdrs, &objp->failure)) {
+ 		return (FALSE);
+ 	    }
+-	    if (!xdr_string(xdrs, &objp->netid, (u_int)~0)) {
++	    if (!xdr_string(xdrs, &objp->netid, RPC_MAXDATASIZE)) {
+ 		return (FALSE);
+ 	    }
+ 
+@@ -109,7 +110,7 @@ xdr_rpcbs_rmtcalllist(xdrs, objp)
+ 		IXDR_PUT_INT32(buf, objp->failure);
+ 		IXDR_PUT_INT32(buf, objp->indirect);
+ 	}
+-	if (!xdr_string(xdrs, &objp->netid, (u_int)~0)) {
++	if (!xdr_string(xdrs, &objp->netid, RPC_MAXDATASIZE)) {
+ 		return (FALSE);
+ 	}
+ 	if (!xdr_pointer(xdrs, (char **)&objp->next,
+@@ -147,7 +148,7 @@ xdr_rpcbs_rmtcalllist(xdrs, objp)
+ 		objp->failure = (int)IXDR_GET_INT32(buf);
+ 		objp->indirect = (int)IXDR_GET_INT32(buf);
+ 	}
+-	if (!xdr_string(xdrs, &objp->netid, (u_int)~0)) {
++	if (!xdr_string(xdrs, &objp->netid, RPC_MAXDATASIZE)) {
+ 		return (FALSE);
+ 	}
+ 	if (!xdr_pointer(xdrs, (char **)&objp->next,
+@@ -175,7 +176,7 @@ xdr_rpcbs_rmtcalllist(xdrs, objp)
+ 	if (!xdr_int(xdrs, &objp->indirect)) {
+ 		return (FALSE);
+ 	}
+-	if (!xdr_string(xdrs, &objp->netid, (u_int)~0)) {
++	if (!xdr_string(xdrs, &objp->netid, RPC_MAXDATASIZE)) {
+ 		return (FALSE);
+ 	}
+ 	if (!xdr_pointer(xdrs, (char **)&objp->next,
+diff --git a/src/xdr.c b/src/xdr.c
+index f3fb9ad..b9a1558 100644
+--- a/src/xdr.c
++++ b/src/xdr.c
+@@ -42,8 +42,10 @@
+ #include <stdlib.h>
+ #include <string.h>
+ 
++#include <rpc/rpc.h>
+ #include <rpc/types.h>
+ #include <rpc/xdr.h>
++#include <rpc/rpc_com.h>
+ 
+ typedef quad_t          longlong_t;     /* ANSI long long type */
+ typedef u_quad_t        u_longlong_t;   /* ANSI unsigned long long type */
+@@ -53,7 +55,6 @@ typedef u_quad_t        u_longlong_t;   /* ANSI unsigned long long type */
+  */
+ #define XDR_FALSE	((long) 0)
+ #define XDR_TRUE	((long) 1)
+-#define LASTUNSIGNED	((u_int) 0-1)
+ 
+ /*
+  * for unit alignment
+@@ -629,6 +630,7 @@ xdr_bytes(xdrs, cpp, sizep, maxsize)
+ {
+ 	char *sp = *cpp;  /* sp is the actual string pointer */
+ 	u_int nodesize;
++	bool_t ret, allocated = FALSE;
+ 
+ 	/*
+ 	 * first deal with the length since xdr bytes are counted
+@@ -652,6 +654,7 @@ xdr_bytes(xdrs, cpp, sizep, maxsize)
+ 		}
+ 		if (sp == NULL) {
+ 			*cpp = sp = mem_alloc(nodesize);
++			allocated = TRUE;
+ 		}
+ 		if (sp == NULL) {
+ 			warnx("xdr_bytes: out of memory");
+@@ -660,7 +663,14 @@ xdr_bytes(xdrs, cpp, sizep, maxsize)
+ 		/* FALLTHROUGH */
+ 
+ 	case XDR_ENCODE:
+-		return (xdr_opaque(xdrs, sp, nodesize));
++		ret = xdr_opaque(xdrs, sp, nodesize);
++		if ((xdrs->x_op == XDR_DECODE) && (ret == FALSE)) {
++			if (allocated == TRUE) {
++				free(sp);
++				*cpp = NULL;
++			}
++		}
++		return (ret);
+ 
+ 	case XDR_FREE:
+ 		if (sp != NULL) {
+@@ -754,6 +764,7 @@ xdr_string(xdrs, cpp, maxsize)
+ 	char *sp = *cpp;  /* sp is the actual string pointer */
+ 	u_int size;
+ 	u_int nodesize;
++	bool_t ret, allocated = FALSE;
+ 
+ 	/*
+ 	 * first deal with the length since xdr strings are counted-strings
+@@ -793,8 +804,10 @@ xdr_string(xdrs, cpp, maxsize)
+ 	switch (xdrs->x_op) {
+ 
+ 	case XDR_DECODE:
+-		if (sp == NULL)
++		if (sp == NULL) {
+ 			*cpp = sp = mem_alloc(nodesize);
++			allocated = TRUE;
++		}
+ 		if (sp == NULL) {
+ 			warnx("xdr_string: out of memory");
+ 			return (FALSE);
+@@ -803,7 +816,14 @@ xdr_string(xdrs, cpp, maxsize)
+ 		/* FALLTHROUGH */
+ 
+ 	case XDR_ENCODE:
+-		return (xdr_opaque(xdrs, sp, size));
++		ret = xdr_opaque(xdrs, sp, size);
++		if ((xdrs->x_op == XDR_DECODE) && (ret == FALSE)) {
++			if (allocated == TRUE) {
++				free(sp);
++				*cpp = NULL;
++			}
++		}
++		return (ret);
+ 
+ 	case XDR_FREE:
+ 		mem_free(sp, nodesize);
+@@ -823,7 +843,7 @@ xdr_wrapstring(xdrs, cpp)
+ 	XDR *xdrs;
+ 	char **cpp;
+ {
+-	return xdr_string(xdrs, cpp, LASTUNSIGNED);
++	return xdr_string(xdrs, cpp, RPC_MAXDATASIZE);
+ }
+ 
+ /*


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] proj/musl:master commit in: net-libs/libtirpc/, net-libs/libtirpc/files/
@ 2017-12-17 18:04 Anthony G. Basile
  0 siblings, 0 replies; 6+ messages in thread
From: Anthony G. Basile @ 2017-12-17 18:04 UTC (permalink / raw
  To: gentoo-commits

commit:     705c15080a5c97f74c2c531a1d620e45827d61f8
Author:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
AuthorDate: Sun Dec 17 18:04:21 2017 +0000
Commit:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Sun Dec 17 18:04:21 2017 +0000
URL:        https://gitweb.gentoo.org/proj/musl.git/commit/?id=705c1508

net-libs/libtirpc: version bump

Package-Manager: Portage-2.3.13, Repoman-2.3.3
RepoMan-Options: --force

 net-libs/libtirpc/Manifest                         |    3 +-
 ...rpcbynumber-and-getrpcbyname-if-those-are.patch |   85 --
 .../libtirpc/files/0002-Misc-header-fixes.patch    |   40 -
 .../libtirpc/files/0003-fix_cdefs_h_include.patch  |  618 ----------
 net-libs/libtirpc/files/0004-fix_DECLS.patch       | 1226 --------------------
 .../libtirpc/files/0005-fix_remaining_issues.patch |   14 -
 net-libs/libtirpc/files/0007-no-des.patch          |   29 -
 net-libs/libtirpc/files/git.patch                  |  842 --------------
 .../libtirpc/files/libtirpc-0.2.5-stdarg.patch     |   29 -
 .../files/libtirpc-1.0.1-CVE-2017-8779.patch       |  255 ----
 .../files/libtirpc-1.0.2-bcopy-to-memmove.patch    |   49 +
 .../files/libtirpc-1.0.2-bzero-to-memset.patch     |   36 +
 .../libtirpc/files/libtirpc-1.0.2-exports.patch    |   17 +
 .../libtirpc/files/libtirpc-1.0.2-glibc-2.26.patch |   12 +
 net-libs/libtirpc/libtirpc-0.2.5.ebuild            |   73 --
 ...pc-1.0.1-r1.ebuild => libtirpc-1.0.2-r1.ebuild} |   12 +-
 16 files changed, 122 insertions(+), 3218 deletions(-)

diff --git a/net-libs/libtirpc/Manifest b/net-libs/libtirpc/Manifest
index 5e5ffd9..a1f6f69 100644
--- a/net-libs/libtirpc/Manifest
+++ b/net-libs/libtirpc/Manifest
@@ -1,3 +1,2 @@
-DIST libtirpc-0.2.5.tar.bz2 459094 SHA256 62f9de7c2c8686c568757730e1fef66502a0e00d6cacf33546d0267984e002db SHA512 9f8afa1acb04a2c2c558018f2528f8caaa79994a2af2abeed947f914145872ef72988b241e11925c799db0de9ec51fd9baecd2b08150240b22f91e2e55a45194 WHIRLPOOL a2b4f1c4825f2b774c2290cccd9d552bb7566ec9eb5988d3ab619d7870a907600f67e7af39fbc3e245606db8534f114c990145789c383206d3a9cf96cf043d8c
-DIST libtirpc-1.0.1.tar.bz2 495125 SHA256 5156974f31be7ccbc8ab1de37c4739af6d9d42c87b1d5caf4835dda75fcbb89e SHA512 c9b449e737bc2bd3d56e31e8352f312e89a7ec2a11b73b5ac314e7d82d3b644c611e422b623912453b67b668f86a6de7bb7f18c9495dd15de8e2798ec2ff41c8 WHIRLPOOL cce6a4e69bd634b40d66594a81c23d2044b63eec16d6c96d6fcfaa7f2ca41fb9af99c8e2b964ec12be82682afa4090b218d7e14399fdfc9b32df6c2234bc3c9e
+DIST libtirpc-1.0.2.tar.bz2 509601 SHA256 723c5ce92706cbb601a8db09110df1b4b69391643158f20ff587e20e7c5f90f5 SHA512 6c819019a8e81d8263d3c509b2eee59ba1ef092222c5a0a8d28f004c711afa252097eca7e6b0b919b2d780883dfd9ee7a363df4cee7fd2c9159a065257637cec WHIRLPOOL 59306a645df28cfcfc1bf9e5215c59f0af7b8a01375ccef66c2ded4863e7183afd4b3ae0e7694f3eff78cc88f3978a4fd0c1b3375698fb90b59a08989021ebdc
 DIST libtirpc-glibc-nfs.tar.xz 8948 SHA256 2677cfedf626f3f5a8f6e507aed5bb8f79a7453b589d684dbbc086e755170d83 SHA512 90255bf0a27af16164e0710dd940778609925d473f4343093ff19d98cc4f23023788bf4edf0178eae1961afc0ba8b69b273de95b7d7e2afdb706701d8ba6f7ba WHIRLPOOL 06bcf3fd4e424a86071e5c4ddeb89aa571c862e765aae9382d9f9a55ab72cd1c623490555c1a9bd3380a2d04ecb10fb47a75a7dddf449d4368a1a01617226858

diff --git a/net-libs/libtirpc/files/0001-Provide-getrpcbynumber-and-getrpcbyname-if-those-are.patch b/net-libs/libtirpc/files/0001-Provide-getrpcbynumber-and-getrpcbyname-if-those-are.patch
deleted file mode 100644
index 3708638..0000000
--- a/net-libs/libtirpc/files/0001-Provide-getrpcbynumber-and-getrpcbyname-if-those-are.patch
+++ /dev/null
@@ -1,85 +0,0 @@
-From d3b5ffed6d7d49cc93b2343afcf0e4502a3e54ce Mon Sep 17 00:00:00 2001
-From: Natanael Copa <ncopa@alpinelinux.org>
-Date: Thu, 24 Apr 2014 09:19:45 +0200
-Subject: [PATCH 1/2] Provide getrpcbynumber and getrpcbyname if those are
- missing
-
-We enable the config.h again and check fi getrpcbynumber and
-getrpcbyname exists on the building patform. If it does not exist, then
-provide those functions.
-
-This is needed for musl libc.
----
- configure.ac    |  6 ++++--
- src/getrpcent.c | 10 ++++++++--
- 2 files changed, 12 insertions(+), 4 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index 10d17ea..0180801 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -24,14 +24,16 @@ if test "x$enable_ipv6" != xno; then
- fi
- 
- AC_PROG_CC
--m4_pattern_allow(AM_CONFIG_HEADERS(config.h))
-+AC_CONFIG_HEADERS([config.h])
- AC_PROG_LIBTOOL
- AC_HEADER_DIRENT
- AC_PREFIX_DEFAULT(/usr)
- AC_CHECK_HEADERS([arpa/inet.h fcntl.h libintl.h limits.h locale.h netdb.h netinet/in.h stddef.h stdint.h stdlib.h string.h sys/ioctl.h sys/param.h sys/socket.h sys/time.h syslog.h unistd.h])
- AC_CHECK_LIB([pthread], [pthread_create])
- AC_CHECK_LIB([nsl], [yp_get_default_domain])
--
-+AC_CHECK_FUNCS([getrpcbyname getrpcbynumber])
- 
- AC_CONFIG_FILES([Makefile src/Makefile man/Makefile doc/Makefile])
- AC_OUTPUT(libtirpc.pc)
-+
-+
-diff --git a/src/getrpcent.c b/src/getrpcent.c
-index 1b54b6d..6da006a 100644
---- a/src/getrpcent.c
-+++ b/src/getrpcent.c
-@@ -50,6 +50,10 @@
- #include <libc_private.h>
- #endif
- 
-+#if HAVE_CONFIG_H
-+#include "config.h"
-+#endif
-+
- /*
-  * Internet version.
-  */
-@@ -89,7 +93,7 @@ _rpcdata()
- 	return (d);
- }
- 
--#ifdef GQ
-+#if !HAVE_GETRPCBYNYMBER
- struct rpcent *
- getrpcbynumber(number)
- 	int number;
-@@ -135,7 +139,9 @@ no_yp:
- 	endrpcent();
- 	return (p);
- }
-+#endif /* !HAVE_GETRPCBYNUMBER */
- 
-+#if !HAVE_GETRPCBYNAME
- struct rpcent *
- getrpcbyname(name)
- 	const char *name;
-@@ -158,7 +164,7 @@ done:
- 	endrpcent();
- 	return (rpc);
- }
--#endif /* GQ */
-+#endif /* !HAVE_GETRPCBYNAME */
- 
- void
- setrpcent(f)
--- 
-1.9.2
-

diff --git a/net-libs/libtirpc/files/0002-Misc-header-fixes.patch b/net-libs/libtirpc/files/0002-Misc-header-fixes.patch
deleted file mode 100644
index 9287d03..0000000
--- a/net-libs/libtirpc/files/0002-Misc-header-fixes.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From ed6dc31ed1092baf42f99278ef9c5c297805c3d0 Mon Sep 17 00:00:00 2001
-From: Natanael Copa <ncopa@alpinelinux.org>
-Date: Thu, 24 Apr 2014 08:58:20 +0200
-Subject: [PATCH 2/2] Misc header fixes
-
-src/bindresvport.c: IPPORT_RESERVED needs netdb.h
-
-Misc fixes for building on musl libc
----
- src/bindresvport.c | 1 +
- tirpc/netconfig.h  | 1 +
- tirpc/rpc/rpcent.h | 2 +-
- tirpc/rpc/types.h  | 1 +
- 4 files changed, 4 insertions(+), 1 deletion(-)
-
-diff --git a/src/bindresvport.c b/src/bindresvport.c
-index d6d9c14..5a7a1a9 100644
---- a/src/bindresvport.c
-+++ b/src/bindresvport.c
-@@ -37,6 +37,7 @@
- #include <sys/types.h>
- #include <sys/socket.h>
- 
-+#include <netdb.h>
- #include <netinet/in.h>
- 
- #include <errno.h>
-diff --git a/tirpc/rpc/rpcent.h b/tirpc/rpc/rpcent.h
-index c865e51..a36cf91 100644
---- a/tirpc/rpc/rpcent.h
-+++ b/tirpc/rpc/rpcent.h
-@@ -47,7 +47,7 @@
- __BEGIN_DECLS
- 
- /* These are defined in /usr/include/rpc/netdb.h */
--#if 0
-+#if !defined(__GLIBC__)
- struct rpcent {
- 	char	*r_name;	/* name of server for this rpc program */
- 	char	**r_aliases;	/* alias list */

diff --git a/net-libs/libtirpc/files/0003-fix_cdefs_h_include.patch b/net-libs/libtirpc/files/0003-fix_cdefs_h_include.patch
deleted file mode 100644
index 4f09b70..0000000
--- a/net-libs/libtirpc/files/0003-fix_cdefs_h_include.patch
+++ /dev/null
@@ -1,618 +0,0 @@
---- ./tirpc/rpc/xdr.h.orig	2014-11-28 09:09:44.902289976 +0000
-+++ ./tirpc/rpc/xdr.h	2014-11-28 09:09:44.903289976 +0000
-@@ -40,7 +40,9 @@
- 
- #ifndef _TIRPC_XDR_H
- #define _TIRPC_XDR_H
-+#ifdef __GLIBC__
- #include <sys/cdefs.h>
-+#endif
- #include <stdio.h>
- #include <netinet/in.h>
- 
---- ./tirpc/rpc/pmap_prot.h.orig	2014-11-28 09:09:44.901289976 +0000
-+++ ./tirpc/rpc/pmap_prot.h	2014-11-28 09:09:44.902289976 +0000
-@@ -71,7 +71,9 @@
- 
- #ifndef _RPC_PMAP_PROT_H
- #define _RPC_PMAP_PROT_H
-+#ifdef __GLIBC__
- #include <sys/cdefs.h>
-+#endif
- 
- #define PMAPPORT		((u_short)111)
- #define PMAPPROG		((u_long)100000)
---- ./tirpc/rpc/auth.h.orig	2014-11-28 09:09:44.896289976 +0000
-+++ ./tirpc/rpc/auth.h	2014-11-28 09:09:44.897289976 +0000
-@@ -48,7 +48,9 @@
- 
- #include <rpc/xdr.h>
- #include <rpc/clnt_stat.h>
-+#ifdef __GLIBC__
- #include <sys/cdefs.h>
-+#endif
- #include <sys/socket.h>
- #include <sys/types.h>
- 
---- ./tirpc/rpc/svc.h.orig	2014-11-28 09:09:44.904289976 +0000
-+++ ./tirpc/rpc/svc.h	2014-11-28 09:09:44.905289976 +0000
-@@ -40,7 +40,9 @@
- 
- #ifndef _TIRPC_SVC_H
- #define _TIRPC_SVC_H
-+#ifdef __GLIBC__
- #include <sys/cdefs.h>
-+#endif
- 
- /*
-  * This interface must manage two items concerning remote procedure calling:
---- ./tirpc/rpc/svc_soc.h.orig	2014-11-28 09:09:44.906289976 +0000
-+++ ./tirpc/rpc/svc_soc.h	2014-11-28 09:09:44.907289976 +0000
-@@ -38,7 +38,9 @@
- 
- #ifndef _RPC_SVC_SOC_H
- #define _RPC_SVC_SOC_H
-+#ifdef __GLIBC__
- #include <sys/cdefs.h>
-+#endif
- 
- /* #pragma ident   "@(#)svc_soc.h  1.11    94/04/25 SMI" */
- /*      svc_soc.h 1.8 89/05/01 SMI      */
---- ./tirpc/rpc/clnt_soc.h.orig	2014-11-28 09:09:44.893289976 +0000
-+++ ./tirpc/rpc/clnt_soc.h	2014-11-28 09:09:44.894289976 +0000
-@@ -46,7 +46,9 @@
-  * with TS-RPC.
-  */
- 
-+#ifdef __GLIBC__
- #include <sys/cdefs.h>
-+#endif
- 
- #define UDPMSGSIZE      8800    /* rpc imposed limit on udp msg size */  
- 
---- ./tirpc/rpc/rpc_com.h.orig	2014-11-28 09:09:44.894289976 +0000
-+++ ./tirpc/rpc/rpc_com.h	2014-11-28 09:09:44.894289976 +0000
-@@ -41,7 +41,9 @@
- #ifndef _RPC_RPCCOM_H
- #define	_RPC_RPCCOM_H
- 
-+#ifdef __GLIBC__
- #include <sys/cdefs.h>
-+#endif
- 
- /* #pragma ident	"@(#)rpc_com.h	1.11	93/07/05 SMI" */
- 
---- ./tirpc/rpc/auth_unix.h.orig	2014-11-28 09:09:44.905289976 +0000
-+++ ./tirpc/rpc/auth_unix.h	2014-11-28 09:09:44.906289976 +0000
-@@ -45,7 +45,9 @@
- 
- #ifndef _TIRPC_AUTH_UNIX_H
- #define _TIRPC_AUTH_UNIX_H
-+#ifdef __GLIBC__
- #include <sys/cdefs.h>
-+#endif
- 
- /* The machine name is part of a credential; it may not exceed 255 bytes */
- #define MAX_MACHINE_NAME 255
---- ./tirpc/rpc/pmap_rmt.h.orig	2014-11-28 09:09:44.899289976 +0000
-+++ ./tirpc/rpc/pmap_rmt.h	2014-11-28 09:09:44.900289976 +0000
-@@ -41,7 +41,9 @@
- 
- #ifndef _RPC_PMAP_RMT_H
- #define _RPC_PMAP_RMT_H
-+#ifdef __GLIBC__
- #include <sys/cdefs.h>
-+#endif
- 
- struct rmtcallargs {
- 	u_long prog, vers, proc, arglen;
---- ./tirpc/rpc/des_crypt.h.orig	2014-11-28 09:09:44.900289976 +0000
-+++ ./tirpc/rpc/des_crypt.h	2014-11-28 09:09:44.901289976 +0000
-@@ -43,7 +43,9 @@
- #ifndef _DES_DES_CRYPT_H
- #define _DES_DES_CRYPT_H
- 
-+#ifdef __GLIBC__
- #include <sys/cdefs.h>
-+#endif
- #include <rpc/rpc.h>
- 
- #define DES_MAXDATA 8192	/* max bytes encrypted in one call */
---- ./tirpc/rpc/clnt.h.orig	2014-11-28 09:09:44.897289976 +0000
-+++ ./tirpc/rpc/clnt.h	2014-11-28 09:09:44.899289976 +0000
-@@ -42,7 +42,9 @@
- #include <rpc/clnt_stat.h>
- #include <rpc/auth.h>
- 
-+#ifdef __GLIBC__
- #include <sys/cdefs.h>
-+#endif
- #include <netconfig.h>
- #include <sys/un.h>
- 
---- ./tirpc/rpc/pmap_clnt.h.orig	2014-11-28 09:09:44.895289976 +0000
-+++ ./tirpc/rpc/pmap_clnt.h	2014-11-28 09:09:44.895289976 +0000
-@@ -63,7 +63,9 @@
- 
- #ifndef _RPC_PMAP_CLNT_H_
- #define _RPC_PMAP_CLNT_H_
-+#ifdef __GLIBC__
- #include <sys/cdefs.h>
-+#endif
- 
- __BEGIN_DECLS
- extern bool_t		pmap_set(u_long, u_long, int, int);
---- ./tirpc/rpcsvc/crypt.x.orig	2014-11-28 09:09:44.907289976 +0000
-+++ ./tirpc/rpcsvc/crypt.x	2014-11-28 09:09:44.908289976 +0000
-@@ -31,7 +31,9 @@
-  */
- 
- #ifndef RPC_HDR
--%#include <sys/cdefs.h>
-+%#ifdef __GLIBC__
-+%#include <sys/cdefs.h>
-+%#endif
- %__FBSDID("$FreeBSD: src/include/rpcsvc/crypt.x,v 1.5 2003/05/04 02:51:42 obrien Exp $");
- #endif
- 
---- ./src/auth_none.c.orig	2014-11-28 09:09:44.875289976 +0000
-+++ ./src/auth_none.c	2014-11-28 09:09:44.876289976 +0000
-@@ -31,7 +31,9 @@
- static char *sccsid = "@(#)auth_none.c 1.19 87/08/11 Copyr 1984 Sun Micro";
- static char *sccsid = "@(#)auth_none.c	2.1 88/07/29 4.0 RPCSRC";
- #endif
-+#ifdef __GLIBC__
- #include <sys/cdefs.h>
-+#endif
- __FBSDID("$FreeBSD: src/lib/libc/rpc/auth_none.c,v 1.12 2002/03/22 23:18:35 obrien Exp $");
- */
- 
---- ./src/crypt_client.c.orig	2014-11-28 09:09:44.886289976 +0000
-+++ ./src/crypt_client.c	2014-11-28 09:09:44.886289976 +0000
-@@ -30,7 +30,9 @@
-  * SUCH DAMAGE.
-  */
- 
-+#ifdef __GLIBC__
- #include <sys/cdefs.h>
-+#endif
- 
- #include <err.h>
- #include <sys/types.h>
---- ./src/xdr_reference.c.orig	2014-11-28 09:09:44.858289976 +0000
-+++ ./src/xdr_reference.c	2014-11-28 09:09:44.859289976 +0000
-@@ -26,8 +26,12 @@
-  * POSSIBILITY OF SUCH DAMAGE.
-  */
- 
-+#ifdef __GLIBC__
- #include <sys/cdefs.h>
-+#endif
-+#ifdef __GLIBC__
- #include <sys/cdefs.h>
-+#endif
- 
- /*
-  * xdr_reference.c, Generic XDR routines impelmentation.
---- ./src/auth_unix.c.orig	2014-11-28 09:09:44.863289976 +0000
-+++ ./src/auth_unix.c	2014-11-28 09:09:44.864289976 +0000
-@@ -26,7 +26,9 @@
-  * POSSIBILITY OF SUCH DAMAGE.
-  */
- 
-+#ifdef __GLIBC__
- #include <sys/cdefs.h>
-+#endif
- 
- /*
-  * auth_unix.c, Implements UNIX style authentication parameters.
---- ./src/authdes_prot.c.orig	2014-11-28 09:09:44.868289976 +0000
-+++ ./src/authdes_prot.c	2014-11-28 09:09:44.869289976 +0000
-@@ -1,4 +1,6 @@
-+#ifdef __GLIBC__
- #include <sys/cdefs.h>
-+#endif
- /*
-  * Copyright (c) 2009, Sun Microsystems, Inc.
-  * All rights reserved.
---- ./src/rpcb_st_xdr.c.orig	2014-11-28 09:09:44.847289976 +0000
-+++ ./src/rpcb_st_xdr.c	2014-11-28 09:09:44.848289976 +0000
-@@ -35,7 +35,9 @@
-  * routines used with the rpcbind stats facility.
-  */
- 
-+#ifdef __GLIBC__
- #include <sys/cdefs.h>
-+#endif
- 
- #include <rpc/rpc.h>
- 
---- ./src/auth_time.c.orig	2014-11-28 09:09:44.887289976 +0000
-+++ ./src/auth_time.c	2014-11-28 09:09:44.888289976 +0000
-@@ -25,7 +25,9 @@
-  *	needed to deal with TCP connections.
-  */
- 
-+#ifdef __GLIBC__
- #include <sys/cdefs.h>
-+#endif
- #include <stdio.h>
- #include <syslog.h>
- #include <string.h>
---- ./src/des_crypt.c.orig	2014-11-28 09:09:44.871289976 +0000
-+++ ./src/des_crypt.c	2014-11-28 09:09:44.872289976 +0000
-@@ -39,7 +39,9 @@
- static char sccsid[] = "@(#)des_crypt.c	2.2 88/08/10 4.0 RPCSRC; from 1.13 88/02/08 SMI";
- #endif
- #endif
-+#ifdef __GLIBC__
- #include <sys/cdefs.h>
-+#endif
- 
- static int common_crypt( char *, char *, unsigned, unsigned, struct desparams * );
- int (*__des_crypt_LOCAL)() = 0;
---- ./src/svc_vc.c.orig	2014-11-28 09:09:44.878289976 +0000
-+++ ./src/svc_vc.c	2014-11-28 09:09:44.879289976 +0000
-@@ -27,7 +27,9 @@
-  * POSSIBILITY OF SUCH DAMAGE.
-  */
- 
-+#ifdef __GLIBC__
- #include <sys/cdefs.h>
-+#endif
- 
- /*
-  * svc_vc.c, Server side for Connection Oriented based RPC. 
---- ./src/xdr_float.c.orig	2014-11-28 09:09:44.882289976 +0000
-+++ ./src/xdr_float.c	2014-11-28 09:09:44.883289976 +0000
-@@ -27,7 +27,9 @@
-  * POSSIBILITY OF SUCH DAMAGE.
-  */
- 
-+#ifdef __GLIBC__
- #include <sys/cdefs.h>
-+#endif
- 
- /*
-  * xdr_float.c, Generic XDR routines implementation.
---- ./src/xdr_sizeof.c.orig	2014-11-28 09:09:44.865289976 +0000
-+++ ./src/xdr_sizeof.c	2014-11-28 09:09:44.866289976 +0000
-@@ -34,7 +34,9 @@
-  * when serialized using XDR.
-  */
- 
-+#ifdef __GLIBC__
- #include <sys/cdefs.h>
-+#endif
- 
- #include <rpc/types.h>
- #include <rpc/xdr.h>
---- ./src/xdr_array.c.orig	2014-11-28 09:09:44.892289976 +0000
-+++ ./src/xdr_array.c	2014-11-28 09:09:44.893289976 +0000
-@@ -27,7 +27,9 @@
-  * POSSIBILITY OF SUCH DAMAGE.
-  */
- 
-+#ifdef __GLIBC__
- #include <sys/cdefs.h>
-+#endif
- 
- /*
-  * xdr_array.c, Generic XDR routines impelmentation.
---- ./src/rpc_generic.c.orig	2014-11-28 09:09:44.842289976 +0000
-+++ ./src/rpc_generic.c	2014-11-28 09:09:44.844289976 +0000
-@@ -29,7 +29,9 @@
-  * Copyright (c) 1986-1991 by Sun Microsystems Inc. 
-  */
- 
-+#ifdef __GLIBC__
- #include <sys/cdefs.h>
-+#endif
- 
- /*
-  * rpc_generic.c, Miscl routines for RPC.
---- ./src/getpeereid.c.orig	2014-11-28 09:09:44.855289976 +0000
-+++ ./src/getpeereid.c	2014-11-28 09:09:44.856289976 +0000
-@@ -24,7 +24,9 @@
-  * SUCH DAMAGE.
-  */
- 
-+#ifdef __GLIBC__
- #include <sys/cdefs.h>
-+#endif
- 
- #include <sys/param.h>
- #include <sys/socket.h>
---- ./src/xdr_stdio.c.orig	2014-11-28 09:09:44.880289976 +0000
-+++ ./src/xdr_stdio.c	2014-11-28 09:09:44.881289976 +0000
-@@ -26,7 +26,9 @@
-  * POSSIBILITY OF SUCH DAMAGE.
-  */
- 
-+#ifdef __GLIBC__
- #include <sys/cdefs.h>
-+#endif
- 
- /*
-  * xdr_stdio.c, XDR implementation on standard i/o file.
---- ./src/clnt_bcast.c.orig	2014-11-28 09:09:44.859289976 +0000
-+++ ./src/clnt_bcast.c	2014-11-28 09:09:44.861289976 +0000
-@@ -28,7 +28,9 @@
- /*
-  * Copyright (c) 1986-1991 by Sun Microsystems Inc. 
-  */
-+#ifdef __GLIBC__
- #include <sys/cdefs.h>
-+#endif
- 
- /*
-  * clnt_bcast.c
---- ./src/xdr_mem.c.orig	2014-11-28 09:09:44.876289976 +0000
-+++ ./src/xdr_mem.c	2014-11-28 09:09:44.877289976 +0000
-@@ -26,7 +26,9 @@
-  * POSSIBILITY OF SUCH DAMAGE.
-  */
- 
-+#ifdef __GLIBC__
- #include <sys/cdefs.h>
-+#endif
- 
- /*
-  * xdr_mem.h, XDR implementation using memory buffers.
---- ./src/key_call.c.orig	2014-11-28 09:09:44.889289976 +0000
-+++ ./src/key_call.c	2014-11-28 09:09:44.890289976 +0000
-@@ -30,7 +30,9 @@
-  */
- 
- 
-+#ifdef __GLIBC__
- #include <sys/cdefs.h>
-+#endif
- 
- /*
-  * key_call.c, Interface to keyserver
---- ./src/svc_simple.c.orig	2014-11-28 09:09:44.874289976 +0000
-+++ ./src/svc_simple.c	2014-11-28 09:09:44.875289976 +0000
-@@ -29,7 +29,9 @@
-  * Copyright (c) 1986-1991 by Sun Microsystems Inc. 
-  */
- 
-+#ifdef __GLIBC__
- #include <sys/cdefs.h>
-+#endif
- 
- /*
-  * svc_simple.c
---- ./src/mt_misc.c.orig	2014-11-28 09:09:44.870289976 +0000
-+++ ./src/mt_misc.c	2014-11-28 09:09:44.871289976 +0000
-@@ -1,5 +1,7 @@
- 
-+#ifdef __GLIBC__
- #include <sys/cdefs.h>
-+#endif
- #include <pthread.h>
- #include <reentrant.h>
- #include <rpc/rpc.h>
---- ./src/authunix_prot.c.orig	2014-11-28 09:09:44.885289976 +0000
-+++ ./src/authunix_prot.c	2014-11-28 09:09:44.885289976 +0000
-@@ -26,7 +26,9 @@
-  * POSSIBILITY OF SUCH DAMAGE.
-  */
- 
-+#ifdef __GLIBC__
- #include <sys/cdefs.h>
-+#endif
- 
- /*
-  * authunix_prot.c
---- ./src/des_soft.c.orig	2014-11-28 09:09:44.851289976 +0000
-+++ ./src/des_soft.c	2014-11-28 09:09:44.851289976 +0000
-@@ -1,4 +1,6 @@
--//#include <sys/cdefs.h>
-+//#ifdef __GLIBC__
-+#include <sys/cdefs.h>
-+#endif
- 
- /*
-  * Copyright (c) 2009, Sun Microsystems, Inc.
---- ./src/rpcdname.c.orig	2014-11-28 09:09:44.850289976 +0000
-+++ ./src/rpcdname.c	2014-11-28 09:09:44.850289976 +0000
-@@ -25,7 +25,9 @@
-  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-  * POSSIBILITY OF SUCH DAMAGE.
-  */
-+#ifdef __GLIBC__
- #include <sys/cdefs.h>
-+#endif
- 
- /*
-  * rpcdname.c
---- ./src/getnetpath.c.orig	2014-11-28 09:09:44.884289976 +0000
-+++ ./src/getnetpath.c	2014-11-28 09:09:44.884289976 +0000
-@@ -25,13 +25,17 @@
-  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-  * POSSIBILITY OF SUCH DAMAGE.
-  */
-+#ifdef __GLIBC__
- #include <sys/cdefs.h>
-+#endif
- 
- /*
-  * Copyright (c) 1989 by Sun Microsystems, Inc.
-  */
- 
-+#ifdef __GLIBC__
- #include <sys/cdefs.h>
-+#endif
- #include <stdio.h>
- #include <errno.h>
- #include <netconfig.h>
---- ./src/svc_dg.c.orig	2014-11-28 09:09:44.852289976 +0000
-+++ ./src/svc_dg.c	2014-11-28 09:09:44.853289976 +0000
-@@ -31,7 +31,9 @@
-  * Copyright (c) 1986-1991 by Sun Microsystems Inc.
-  */
- 
-+#ifdef __GLIBC__
- #include <sys/cdefs.h>
-+#endif
- 
- /*
-  * svc_dg.c, Server side for connectionless RPC.
---- ./src/rpc_com.h.orig	2014-11-28 09:09:44.845289976 +0000
-+++ ./src/rpc_com.h	2014-11-28 09:09:44.846289976 +0000
-@@ -40,7 +40,9 @@
- #ifndef _TIRPC_RPCCOM_H
- #define	_TIRPC_RPCCOM_H
- 
-+#ifdef __GLIBC__
- #include <sys/cdefs.h>
-+#endif
- 
- /* #pragma ident	"@(#)rpc_com.h	1.11	93/07/05 SMI" */
- 
---- ./src/pmap_getmaps.c.orig	2014-11-28 09:09:44.891289976 +0000
-+++ ./src/pmap_getmaps.c	2014-11-28 09:09:44.892289976 +0000
-@@ -26,7 +26,9 @@
-  * POSSIBILITY OF SUCH DAMAGE.
-  */
- 
-+#ifdef __GLIBC__
- #include <sys/cdefs.h>
-+#endif
- 
- /*
-  * pmap_getmap.c
---- ./src/pmap_clnt.c.orig	2014-11-28 09:09:44.869289976 +0000
-+++ ./src/pmap_clnt.c	2014-11-28 09:09:44.870289976 +0000
-@@ -26,7 +26,9 @@
-  * POSSIBILITY OF SUCH DAMAGE.
-  */
- 
-+#ifdef __GLIBC__
- #include <sys/cdefs.h>
-+#endif
- 
- /*
-  * pmap_clnt.c
---- ./src/bindresvport.c.orig	2014-11-28 09:09:44.848289976 +0000
-+++ ./src/bindresvport.c	2014-11-28 09:09:44.849289976 +0000
-@@ -26,7 +26,9 @@
-  * POSSIBILITY OF SUCH DAMAGE.
-  */
- 
-+#ifdef __GLIBC__
- #include <sys/cdefs.h>
-+#endif
- 
- /*
-  * Copyright (c) 1987 by Sun Microsystems, Inc.
---- ./src/xdr_rec.c.orig	2014-11-28 09:09:44.866289976 +0000
-+++ ./src/xdr_rec.c	2014-11-28 09:09:44.868289976 +0000
-@@ -27,8 +27,12 @@
-  * POSSIBILITY OF SUCH DAMAGE.
-  */
- 
-+#ifdef __GLIBC__
- #include <sys/cdefs.h>
-+#endif
-+#ifdef __GLIBC__
- #include <sys/cdefs.h>
-+#endif
- 
- /*
-  * xdr_rec.c, Implements TCP/IP based XDR streams with a "record marking"
---- ./src/clnt_perror.c.orig	2014-11-28 09:09:44.854289976 +0000
-+++ ./src/clnt_perror.c	2014-11-28 09:09:44.855289976 +0000
-@@ -27,7 +27,9 @@
-  */
- 
- /*
-+#ifdef __GLIBC__
- #include <sys/cdefs.h>
-+#endif
- */
- /*
-  * clnt_perror.c
---- ./src/key_prot_xdr.c.orig	2014-11-28 09:09:44.888289976 +0000
-+++ ./src/key_prot_xdr.c	2014-11-28 09:09:44.889289976 +0000
-@@ -33,7 +33,9 @@
-  */
- /* Copyright (c)  1990, 1991 Sun Microsystems, Inc. */
- 
-+#ifdef __GLIBC__
- #include <sys/cdefs.h>
-+#endif
- 
- /* 
-  * Compiled from key_prot.x using rpcgen.
---- ./src/getnetconfig.c.orig	2014-11-28 09:09:44.856289976 +0000
-+++ ./src/getnetconfig.c	2014-11-28 09:09:44.858289976 +0000
-@@ -32,7 +32,9 @@
-  
- #include <pthread.h>
- #include <reentrant.h>
-+#ifdef __GLIBC__
- #include <sys/cdefs.h>
-+#endif
- #include <stdio.h>
- #include <errno.h>
- #include <netconfig.h>
---- ./src/getpublickey.c.orig	2014-11-28 09:09:44.844289976 +0000
-+++ ./src/getpublickey.c	2014-11-28 09:09:44.845289976 +0000
-@@ -26,7 +26,9 @@
-  * POSSIBILITY OF SUCH DAMAGE.
-  */
- /*
-+#ifdef __GLIBC__
- #include <sys/cdefs.h>
-+#endif
- */
- 
- /*
---- ./src/clnt_simple.c.orig	2014-11-28 09:09:44.881289976 +0000
-+++ ./src/clnt_simple.c	2014-11-28 09:09:44.882289976 +0000
-@@ -29,7 +29,9 @@
-  * Copyright (c) 1986-1991 by Sun Microsystems Inc. 
-  */
- 
-+#ifdef __GLIBC__
- #include <sys/cdefs.h>
-+#endif
- 
- /*
-  * clnt_simple.c
---- ./src/auth_des.c.orig	2014-11-28 09:09:44.872289976 +0000
-+++ ./src/auth_des.c	2014-11-28 09:09:44.874289976 +0000
-@@ -38,7 +38,9 @@
- #include <string.h>
- #include <stdlib.h>
- #include <unistd.h>
-+#ifdef __GLIBC__
- #include <sys/cdefs.h>
-+#endif
- #include <rpc/des_crypt.h>
- #include <syslog.h>
- #include <rpc/types.h>
-@@ -52,7 +54,9 @@
- 
- #if defined(LIBC_SCCS) && !defined(lint)
- #endif
-+#ifdef __GLIBC__
- #include <sys/cdefs.h>
-+#endif
- 
- #include "debug.h"
- 
---- ./src/xdr.c.orig	2014-11-28 09:09:44.861289976 +0000
-+++ ./src/xdr.c	2014-11-28 09:09:44.863289976 +0000
-@@ -26,7 +26,9 @@
-  * POSSIBILITY OF SUCH DAMAGE.
-  */
- 
-+#ifdef __GLIBC__
- #include <sys/cdefs.h>
-+#endif
- 
- /*
-  * xdr.c, Generic XDR routines implementation.

diff --git a/net-libs/libtirpc/files/0004-fix_DECLS.patch b/net-libs/libtirpc/files/0004-fix_DECLS.patch
deleted file mode 100644
index 86abf77..0000000
--- a/net-libs/libtirpc/files/0004-fix_DECLS.patch
+++ /dev/null
@@ -1,1226 +0,0 @@
---- ./tirpc/rpc/xdr.h.orig	2014-11-28 09:16:53.990289976 +0000
-+++ ./tirpc/rpc/xdr.h	2014-11-28 09:16:53.991289976 +0000
-@@ -289,7 +289,11 @@ struct xdr_discrim {
- /*
-  * These are the "generic" xdr routines.
-  */
-+#ifdef __GLIBC__
- __BEGIN_DECLS
-+#elif defined(__cplusplus)
-+extern "C" {
-+#endif
- extern bool_t	xdr_void(void);
- extern bool_t	xdr_int(XDR *, int *);
- extern bool_t	xdr_u_int(XDR *, u_int *);
-@@ -332,7 +336,11 @@ 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 *);
-+#ifdef __GLIBC__
- __END_DECLS
-+#elif defined(__cplusplus)
-+}
-+#endif
- 
- /*
-  * Common opaque bytes objects used by many rpc protocols;
-@@ -350,7 +358,11 @@ extern bool_t   xdr_netobj(XDR *, struct
-  * These are the public routines for the various implementations of
-  * xdr streams.
-  */
-+#ifdef __GLIBC__
- __BEGIN_DECLS
-+#elif defined(__cplusplus)
-+extern "C" {
-+#endif
- /* XDR using memory buffers */
- extern void   xdrmem_create(XDR *, char *, u_int, enum xdr_op);
- 
-@@ -371,6 +383,10 @@ extern bool_t xdrrec_skiprecord(XDR *);
- /* true if no more input */
- extern bool_t xdrrec_eof(XDR *);
- extern u_int xdrrec_readbytes(XDR *, caddr_t, u_int);
-+#ifdef __GLIBC__
- __END_DECLS
-+#elif defined(__cplusplus)
-+}
-+#endif
- 
- #endif /* !_TIRPC_XDR_H */
---- ./tirpc/rpc/auth_des.h.orig	2014-11-28 09:16:53.994289976 +0000
-+++ ./tirpc/rpc/auth_des.h	2014-11-28 09:16:53.995289976 +0000
-@@ -114,17 +114,33 @@ struct authdes_verf {
-  * Map a des credential into a unix cred.
-  *
-  */
-+#ifdef __GLIBC__
- __BEGIN_DECLS
-+#elif defined(__cplusplus)
-+extern "C" {
-+#endif
- extern int authdes_getucred( struct authdes_cred *, uid_t *, gid_t *, int *, gid_t * );
-+#ifdef __GLIBC__
- __END_DECLS
-+#elif defined(__cplusplus)
-+}
-+#endif
- 
-+#ifdef __GLIBC__
- __BEGIN_DECLS
-+#elif defined(__cplusplus)
-+extern "C" {
-+#endif
- extern bool_t	xdr_authdes_cred(XDR *, struct authdes_cred *);
- extern bool_t	xdr_authdes_verf(XDR *, struct authdes_verf *);
- extern int	rtime(dev_t, struct netbuf *, int, struct timeval *,
- 		    struct timeval *);
- extern void	kgetnetname(char *);
- extern enum auth_stat _svcauth_des(struct svc_req *, struct rpc_msg *);
-+#ifdef __GLIBC__
- __END_DECLS
-+#elif defined(__cplusplus)
-+}
-+#endif
- 
- #endif /* ndef _TI_AUTH_DES_ */
---- ./tirpc/rpc/pmap_prot.h.orig	2014-11-28 09:16:53.988289976 +0000
-+++ ./tirpc/rpc/pmap_prot.h	2014-11-28 09:16:53.989289976 +0000
-@@ -99,10 +99,18 @@ struct pmaplist {
- 	struct pmaplist *pml_next;
- };
- 
-+#ifdef __GLIBC__
- __BEGIN_DECLS
-+#elif defined(__cplusplus)
-+extern "C" {
-+#endif
- extern bool_t xdr_pmap(XDR *, struct pmap *);
- extern bool_t xdr_pmaplist(XDR *, struct pmaplist **);
- extern bool_t xdr_pmaplist_ptr(XDR *, struct pmaplist *);
-+#ifdef __GLIBC__
- __END_DECLS
-+#elif defined(__cplusplus)
-+}
-+#endif
- 
- #endif /* !_RPC_PMAP_PROT_H */
---- ./tirpc/rpc/auth.h.orig	2014-11-28 09:16:53.982289976 +0000
-+++ ./tirpc/rpc/auth.h	2014-11-28 09:16:53.983289976 +0000
-@@ -166,9 +166,17 @@ union des_block {
- 	char c[8];
- };
- typedef union des_block des_block;
-+#ifdef __GLIBC__
- __BEGIN_DECLS
-+#elif defined(__cplusplus)
-+extern "C" {
-+#endif
- extern bool_t xdr_des_block(XDR *, des_block *);
-+#ifdef __GLIBC__
- __END_DECLS
-+#elif defined(__cplusplus)
-+}
-+#endif
- 
- /*
-  * Authentication info.  Opaque to client.
-@@ -279,9 +287,17 @@ auth_put(AUTH *auth)
- 		xfunc, xwhere))
- 
- 
-+#ifdef __GLIBC__
- __BEGIN_DECLS
-+#elif defined(__cplusplus)
-+extern "C" {
-+#endif
- extern struct opaque_auth _null_auth;
-+#ifdef __GLIBC__
- __END_DECLS
-+#elif defined(__cplusplus)
-+}
-+#endif
- 
- /*
-  * Any style authentication.  These routines can be used by any
-@@ -302,11 +318,19 @@ int authany_wrap(void), authany_unwrap(v
-  *	int len;
-  *	int *aup_gids;
-  */
-+#ifdef __GLIBC__
- __BEGIN_DECLS
-+#elif defined(__cplusplus)
-+extern "C" {
-+#endif
- extern AUTH *authunix_create(char *, uid_t, uid_t, int, uid_t *);
- extern AUTH *authunix_create_default(void);	/* takes no parameters */
- extern AUTH *authnone_create(void);		/* takes no parameters */
-+#ifdef __GLIBC__
- __END_DECLS
-+#elif defined(__cplusplus)
-+}
-+#endif
- /*
-  * DES style authentication
-  * AUTH *authsecdes_create(servername, window, timehost, ckey)
-@@ -315,15 +339,31 @@ __END_DECLS
-  * 	const char *timehost;			- optional hostname to sync with
-  * 	des_block *ckey;		- optional conversation key to use
-  */
-+#ifdef __GLIBC__
- __BEGIN_DECLS
-+#elif defined(__cplusplus)
-+extern "C" {
-+#endif
- extern AUTH *authdes_create (char *, u_int, struct sockaddr *, des_block *);
- extern AUTH *authdes_seccreate (const char *, const u_int, const  char *,
-     const  des_block *);
-+#ifdef __GLIBC__
- __END_DECLS
-+#elif defined(__cplusplus)
-+}
-+#endif
- 
-+#ifdef __GLIBC__
- __BEGIN_DECLS
-+#elif defined(__cplusplus)
-+extern "C" {
-+#endif
- extern bool_t xdr_opaque_auth		(XDR *, struct opaque_auth *);
-+#ifdef __GLIBC__
- __END_DECLS
-+#elif defined(__cplusplus)
-+}
-+#endif
- 
- #define authsys_create(c,i1,i2,i3,ip) authunix_create((c),(i1),(i2),(i3),(ip))
- #define authsys_create_default() authunix_create_default()
-@@ -331,36 +371,60 @@ __END_DECLS
- /*
-  * Netname manipulation routines.
-  */
-+#ifdef __GLIBC__
- __BEGIN_DECLS
-+#elif defined(__cplusplus)
-+extern "C" {
-+#endif
- extern int getnetname(char *);
- extern int host2netname(char *, const char *, const char *);
- extern int user2netname(char *, const uid_t, const char *);
- extern int netname2user(char *, uid_t *, gid_t *, int *, gid_t *);
- extern int netname2host(char *, char *, const int);
- extern void passwd2des ( char *, char * );
-+#ifdef __GLIBC__
- __END_DECLS
-+#elif defined(__cplusplus)
-+}
-+#endif
- 
- /*
-  *
-  * These routines interface to the keyserv daemon
-  *
-  */
-+#ifdef __GLIBC__
- __BEGIN_DECLS
-+#elif defined(__cplusplus)
-+extern "C" {
-+#endif
- extern int key_decryptsession(const char *, des_block *);
- extern int key_encryptsession(const char *, des_block *);
- extern int key_gendes(des_block *);
- extern int key_setsecret(const char *);
- extern int key_secretkey_is_set(void);
-+#ifdef __GLIBC__
- __END_DECLS
-+#elif defined(__cplusplus)
-+}
-+#endif
- 
- /*
-  * Publickey routines.
-  */
-+#ifdef __GLIBC__
- __BEGIN_DECLS
-+#elif defined(__cplusplus)
-+extern "C" {
-+#endif
- extern int getpublickey (const char *, char *);
- extern int getpublicandprivatekey (char *, char *);
- extern int getsecretkey (char *, char *, char *);
-+#ifdef __GLIBC__
- __END_DECLS
-+#elif defined(__cplusplus)
-+}
-+#endif
- 
- #ifdef KERBEROS
- /*
-@@ -373,10 +437,18 @@ __END_DECLS
-  *	const char *timehost;			- optional hostname to sync with
-  *	int *status;				- kerberos status returned
-  */
-+#ifdef __GLIBC__
- __BEGIN_DECLS
-+#elif defined(__cplusplus)
-+extern "C" {
-+#endif
- extern AUTH	*authkerb_seccreate(const char *, const char *, const  char *,
- 		    const u_int, const char *, int *);
-+#ifdef __GLIBC__
- __END_DECLS
-+#elif defined(__cplusplus)
-+}
-+#endif
- 
- /*
-  * Map a kerberos credential into a unix cred.
-@@ -389,20 +461,36 @@ __END_DECLS
-  *	int *groups;
-  *
-  */
-+#ifdef __GLIBC__
- __BEGIN_DECLS
-+#elif defined(__cplusplus)
-+extern "C" {
-+#endif
- extern int	authkerb_getucred(/* struct svc_req *, uid_t *, gid_t *,
- 		    short *, int * */);
-+#ifdef __GLIBC__
- __END_DECLS
-+#elif defined(__cplusplus)
-+}
-+#endif
- #endif /* KERBEROS */
- 
-+#ifdef __GLIBC__
- __BEGIN_DECLS
-+#elif defined(__cplusplus)
-+extern "C" {
-+#endif
- struct svc_req;
- struct rpc_msg;
- enum auth_stat _svcauth_none (struct svc_req *, struct rpc_msg *);
- enum auth_stat _svcauth_short (struct svc_req *, struct rpc_msg *);
- enum auth_stat _svcauth_unix (struct svc_req *, struct rpc_msg *);
- enum auth_stat _svcauth_gss (struct svc_req *, struct rpc_msg *, bool_t *);
-+#ifdef __GLIBC__
- __END_DECLS
-+#elif defined(__cplusplus)
-+}
-+#endif
- 
- #define AUTH_NONE	0		/* no authentication */
- #define	AUTH_NULL	0		/* backward compatibility */
---- ./tirpc/rpc/svc.h.orig	2014-11-28 09:16:53.992289976 +0000
-+++ ./tirpc/rpc/svc.h	2014-11-28 09:16:53.993289976 +0000
-@@ -202,11 +202,19 @@ struct svc_req {
-  *	const struct netconfig *nconf;
-  */
- 
-+#ifdef __GLIBC__
- __BEGIN_DECLS
-+#elif defined(__cplusplus)
-+extern "C" {
-+#endif
- extern bool_t	svc_reg(SVCXPRT *, const rpcprog_t, const rpcvers_t,
- 			void (*)(struct svc_req *, SVCXPRT *),
- 			const struct netconfig *);
-+#ifdef __GLIBC__
- __END_DECLS
-+#elif defined(__cplusplus)
-+}
-+#endif
- 
- /*
-  * Service un-registration
-@@ -216,9 +224,17 @@ __END_DECLS
-  *	const rpcvers_t vers;
-  */
- 
-+#ifdef __GLIBC__
- __BEGIN_DECLS
-+#elif defined(__cplusplus)
-+extern "C" {
-+#endif
- extern void	svc_unreg(const rpcprog_t, const rpcvers_t);
-+#ifdef __GLIBC__
- __END_DECLS
-+#elif defined(__cplusplus)
-+}
-+#endif
- 
- /*
-  * Transport registration.
-@@ -226,9 +242,17 @@ __END_DECLS
-  * xprt_register(xprt)
-  *	SVCXPRT *xprt;
-  */
-+#ifdef __GLIBC__
- __BEGIN_DECLS
-+#elif defined(__cplusplus)
-+extern "C" {
-+#endif
- extern void	xprt_register(SVCXPRT *);
-+#ifdef __GLIBC__
- __END_DECLS
-+#elif defined(__cplusplus)
-+}
-+#endif
- 
- /*
-  * Transport un-register
-@@ -236,9 +260,17 @@ __END_DECLS
-  * xprt_unregister(xprt)
-  *	SVCXPRT *xprt;
-  */
-+#ifdef __GLIBC__
- __BEGIN_DECLS
-+#elif defined(__cplusplus)
-+extern "C" {
-+#endif
- extern void	xprt_unregister(SVCXPRT *);
-+#ifdef __GLIBC__
- __END_DECLS
-+#elif defined(__cplusplus)
-+}
-+#endif
- 
- 
- /*
-@@ -267,7 +299,11 @@ __END_DECLS
-  * deadlock the caller and server processes!
-  */
- 
-+#ifdef __GLIBC__
- __BEGIN_DECLS
-+#elif defined(__cplusplus)
-+extern "C" {
-+#endif
- extern bool_t	svc_sendreply(SVCXPRT *, xdrproc_t, void *);
- extern void	svcerr_decode(SVCXPRT *);
- extern void	svcerr_weakauth(SVCXPRT *);
-@@ -279,7 +315,11 @@ extern void	svcerr_systemerr(SVCXPRT *);
- extern int	rpc_reg(rpcprog_t, rpcvers_t, rpcproc_t,
- 			char *(*)(char *), xdrproc_t, xdrproc_t,
- 			char *);
-+#ifdef __GLIBC__
- __END_DECLS
-+#elif defined(__cplusplus)
-+}
-+#endif
- 
- /*
-  * Lowest level dispatching -OR- who owns this process anyway.
-@@ -308,11 +348,23 @@ extern int svc_fds;
-  * a small program implemented by the svc_rpc implementation itself;
-  * also see clnt.h for protocol numbers.
-  */
-+#ifdef __GLIBC__
- __BEGIN_DECLS
-+#elif defined(__cplusplus)
-+extern "C" {
-+#endif
- extern void rpctest_service(void);
-+#ifdef __GLIBC__
- __END_DECLS
-+#elif defined(__cplusplus)
-+}
-+#endif
- 
-+#ifdef __GLIBC__
- __BEGIN_DECLS
-+#elif defined(__cplusplus)
-+extern "C" {
-+#endif
- extern void	svc_getreq(int);
- extern void	svc_getreqset(fd_set *);
- extern void	svc_getreq_common(int);
-@@ -321,7 +373,11 @@ extern void	svc_getreq_poll(struct pollf
- 
- extern void	svc_run(void);
- extern void	svc_exit(void);
-+#ifdef __GLIBC__
- __END_DECLS
-+#elif defined(__cplusplus)
-+}
-+#endif
- 
- /*
-  * Socket to use on svcxxx_create call to get default socket
-@@ -333,7 +389,11 @@ __END_DECLS
-  * These are the existing service side transport implementations
-  */
- 
-+#ifdef __GLIBC__
- __BEGIN_DECLS
-+#elif defined(__cplusplus)
-+extern "C" {
-+#endif
- /*
-  * Transport independent svc_create routine.
-  */
-@@ -429,7 +489,11 @@ int svc_dg_enablecache(SVCXPRT *, const
- 
- int __rpc_get_local_uid(SVCXPRT *_transp, uid_t *_uid);
- 
-+#ifdef __GLIBC__
- __END_DECLS
-+#elif defined(__cplusplus)
-+}
-+#endif
- 
- 
- /* for backward compatibility */
---- ./tirpc/rpc/rpc.h.orig	2014-11-28 09:16:53.994289976 +0000
-+++ ./tirpc/rpc/rpc.h	2014-11-28 09:16:53.994289976 +0000
-@@ -79,7 +79,11 @@
- #define UDPMSGSIZE 8800
- #endif
- 
-+#ifdef __GLIBC__
- __BEGIN_DECLS
-+#elif defined(__cplusplus)
-+extern "C" {
-+#endif
- extern int get_myaddress(struct sockaddr_in *);
- extern int bindresvport(int, struct sockaddr_in *) __THROW;
- extern int registerrpc(int, int, int, char *(*)(char [UDPMSGSIZE]),
-@@ -93,18 +97,30 @@ struct netbuf *uaddr2taddr(const struct
- 
- struct sockaddr;
- extern int bindresvport_sa(int, struct sockaddr *);
-+#ifdef __GLIBC__
- __END_DECLS
-+#elif defined(__cplusplus)
-+}
-+#endif
- 
- /*
-  * The following are not exported interfaces, they are for internal library
-  * and rpcbind use only. Do not use, they may change without notice.
-  */
-+#ifdef __GLIBC__
- __BEGIN_DECLS
-+#elif defined(__cplusplus)
-+extern "C" {
-+#endif
- int __rpc_nconf2fd(const struct netconfig *);
- int __rpc_nconf2fd_flags(const struct netconfig *, int);
- int __rpc_nconf2sockinfo(const struct netconfig *, struct __rpc_sockinfo *);
- int __rpc_fd2sockinfo(int, struct __rpc_sockinfo *);
- u_int __rpc_get_t_size(int, int, int);
-+#ifdef __GLIBC__
- __END_DECLS
-+#elif defined(__cplusplus)
-+}
-+#endif
- 
- #endif /* !_RPC_RPC_H */
---- ./tirpc/rpc/svc_soc.h.orig	2014-11-28 09:16:53.998289976 +0000
-+++ ./tirpc/rpc/svc_soc.h	2014-11-28 09:16:53.999289976 +0000
-@@ -66,10 +66,18 @@
-  *	void (*dispatch)();
-  *	int protocol;    like TCP or UDP, zero means do not register 
-  */
-+#ifdef __GLIBC__
- __BEGIN_DECLS
-+#elif defined(__cplusplus)
-+extern "C" {
-+#endif
- extern bool_t	svc_register(SVCXPRT *, u_long, u_long,
- 		    void (*)(struct svc_req *, SVCXPRT *), int);
-+#ifdef __GLIBC__
- __END_DECLS
-+#elif defined(__cplusplus)
-+}
-+#endif
- 
- /*
-  * Service un-registration
-@@ -78,44 +86,84 @@ __END_DECLS
-  *	u_long prog;
-  *	u_long vers;
-  */
-+#ifdef __GLIBC__
- __BEGIN_DECLS
-+#elif defined(__cplusplus)
-+extern "C" {
-+#endif
- extern void	svc_unregister(u_long, u_long);
-+#ifdef __GLIBC__
- __END_DECLS
-+#elif defined(__cplusplus)
-+}
-+#endif
- 
- 
- /*
-  * Memory based rpc for testing and timing.
-  */
-+#ifdef __GLIBC__
- __BEGIN_DECLS
-+#elif defined(__cplusplus)
-+extern "C" {
-+#endif
- extern SVCXPRT *svcraw_create(void);
-+#ifdef __GLIBC__
- __END_DECLS
-+#elif defined(__cplusplus)
-+}
-+#endif
- 
- 
- /*
-  * Udp based rpc.
-  */
-+#ifdef __GLIBC__
- __BEGIN_DECLS
-+#elif defined(__cplusplus)
-+extern "C" {
-+#endif
- extern SVCXPRT *svcudp_create(int);
- extern SVCXPRT *svcudp_bufcreate(int, u_int, u_int);
- extern int svcudp_enablecache(SVCXPRT *, u_long);
- extern SVCXPRT *svcudp6_create(int);
- extern SVCXPRT *svcudp6_bufcreate(int, u_int, u_int);
-+#ifdef __GLIBC__
- __END_DECLS
-+#elif defined(__cplusplus)
-+}
-+#endif
- 
- 
- /*
-  * Tcp based rpc.
-  */
-+#ifdef __GLIBC__
- __BEGIN_DECLS
-+#elif defined(__cplusplus)
-+extern "C" {
-+#endif
- extern SVCXPRT *svctcp_create(int, u_int, u_int);
- extern SVCXPRT *svctcp6_create(int, u_int, u_int);
-+#ifdef __GLIBC__
- __END_DECLS
-+#elif defined(__cplusplus)
-+}
-+#endif
- 
- /*
-  * Fd based rpc.
-  */
-+#ifdef __GLIBC__
- __BEGIN_DECLS
-+#elif defined(__cplusplus)
-+extern "C" {
-+#endif
- extern SVCXPRT *svcfd_create(int, u_int, u_int);
-+#ifdef __GLIBC__
- __END_DECLS
-+#elif defined(__cplusplus)
-+}
-+#endif
- 
- #endif /* !_RPC_SVC_SOC_H */
---- ./tirpc/rpc/clnt_soc.h.orig	2014-11-28 09:16:53.976289976 +0000
-+++ ./tirpc/rpc/clnt_soc.h	2014-11-28 09:16:53.977289976 +0000
-@@ -63,27 +63,51 @@
-  *	u_int sendsz;
-  *	u_int recvsz;
-  */
-+#ifdef __GLIBC__
- __BEGIN_DECLS
-+#elif defined(__cplusplus)
-+extern "C" {
-+#endif
- extern CLIENT *clnttcp_create(struct sockaddr_in *, u_long, u_long, int *,
- 			      u_int, u_int);
-+#ifdef __GLIBC__
- __END_DECLS
-+#elif defined(__cplusplus)
-+}
-+#endif
- 
- /*
-  * Raw (memory) rpc.
-  */
-+#ifdef __GLIBC__
- __BEGIN_DECLS
-+#elif defined(__cplusplus)
-+extern "C" {
-+#endif
- extern CLIENT *clntraw_create(u_long, u_long);
-+#ifdef __GLIBC__
- __END_DECLS
-+#elif defined(__cplusplus)
-+}
-+#endif
- 
- 
- /*
- IPv6 socket version 
- */
- #ifdef INET6
-+#ifdef __GLIBC__
- __BEGIN_DECLS
-+#elif defined(__cplusplus)
-+extern "C" {
-+#endif
- extern CLIENT *clnttcp6_create(struct sockaddr_in6 *, u_long, u_long, int *,
- 			      u_int, u_int);
-+#ifdef __GLIBC__
- __END_DECLS
-+#elif defined(__cplusplus)
-+}
-+#endif
- #endif
- 
- /*
-@@ -107,7 +131,11 @@ __END_DECLS
-  *	u_int sendsz;
-  *	u_int recvsz;
-  */
-+#ifdef __GLIBC__
- __BEGIN_DECLS
-+#elif defined(__cplusplus)
-+extern "C" {
-+#endif
- extern CLIENT *clntudp_create(struct sockaddr_in *, u_long, u_long, 
- 			      struct timeval, int *);
- extern CLIENT *clntudp_bufcreate(struct sockaddr_in *, u_long, u_long,
-@@ -118,7 +146,11 @@ extern CLIENT *clntudp6_create(struct so
- extern CLIENT *clntudp6_bufcreate(struct sockaddr_in6 *, u_long, u_long,
- 				 struct timeval, int *, u_int, u_int);
- #endif
-+#ifdef __GLIBC__
- __END_DECLS
-+#elif defined(__cplusplus)
-+}
-+#endif
- 
- 
- #endif /* _RPC_CLNT_SOC_H */
---- ./tirpc/rpc/rpc_com.h.orig	2014-11-28 09:16:53.977289976 +0000
-+++ ./tirpc/rpc/rpc_com.h	2014-11-28 09:16:53.978289976 +0000
-@@ -57,7 +57,11 @@
- #define __RPC_GETXID(now) ((u_int32_t)getpid() ^ (u_int32_t)(now)->tv_sec ^ \
-     (u_int32_t)(now)->tv_usec)
- 
-+#ifdef __GLIBC__
- __BEGIN_DECLS
-+#elif defined(__cplusplus)
-+extern "C" {
-+#endif
- extern u_int __rpc_get_a_size(int);
- extern int __rpc_dtbsize(void);
- extern int _rpc_dtablesize(void);
-@@ -79,6 +83,10 @@ bool_t rpc_control(int,void *);
- 
- char *_get_next_token(char *, int);
- 
-+#ifdef __GLIBC__
- __END_DECLS
-+#elif defined(__cplusplus)
-+}
-+#endif
- 
- #endif /* _RPC_RPCCOM_H */
---- ./tirpc/rpc/auth_unix.h.orig	2014-11-28 09:16:53.998289976 +0000
-+++ ./tirpc/rpc/auth_unix.h	2014-11-28 09:16:53.998289976 +0000
-@@ -69,9 +69,17 @@ struct authunix_parms {
- 
- #define authsys_parms authunix_parms
- 
-+#ifdef __GLIBC__
- __BEGIN_DECLS
-+#elif defined(__cplusplus)
-+extern "C" {
-+#endif
- extern bool_t xdr_authunix_parms(XDR *, struct authunix_parms *);
-+#ifdef __GLIBC__
- __END_DECLS
-+#elif defined(__cplusplus)
-+}
-+#endif
- 
- /*
-  * If a response verifier has flavor AUTH_SHORT,
---- ./tirpc/rpc/pmap_rmt.h.orig	2014-11-28 09:16:53.986289976 +0000
-+++ ./tirpc/rpc/pmap_rmt.h	2014-11-28 09:16:53.986289976 +0000
-@@ -58,9 +58,17 @@ struct rmtcallres {
- 	xdrproc_t xdr_results;
- };
- 
-+#ifdef __GLIBC__
- __BEGIN_DECLS
-+#elif defined(__cplusplus)
-+extern "C" {
-+#endif
- extern bool_t xdr_rmtcall_args(XDR *, struct rmtcallargs *);
- extern bool_t xdr_rmtcallres(XDR *, struct rmtcallres *);
-+#ifdef __GLIBC__
- __END_DECLS
-+#elif defined(__cplusplus)
-+}
-+#endif
- 
- #endif /* !_RPC_PMAP_RMT_H */
---- ./tirpc/rpc/des_crypt.h.orig	2014-11-28 09:16:53.987289976 +0000
-+++ ./tirpc/rpc/des_crypt.h	2014-11-28 09:16:53.988289976 +0000
-@@ -85,23 +85,47 @@
- /*
-  * Cipher Block Chaining mode
-  */
-+#ifdef __GLIBC__
- __BEGIN_DECLS
-+#elif defined(__cplusplus)
-+extern "C" {
-+#endif
- int cbc_crypt( char *, char *, unsigned int, unsigned int, char *);
-+#ifdef __GLIBC__
- __END_DECLS
-+#elif defined(__cplusplus)
-+}
-+#endif
- 
- /*
-  * Electronic Code Book mode
-  */
-+#ifdef __GLIBC__
- __BEGIN_DECLS
-+#elif defined(__cplusplus)
-+extern "C" {
-+#endif
- int ecb_crypt( char *, char *, unsigned int, unsigned int );
-+#ifdef __GLIBC__
- __END_DECLS
-+#elif defined(__cplusplus)
-+}
-+#endif
- 
- /* 
-  * Set des parity for a key.
-  * DES parity is odd and in the low bit of each byte
-  */
-+#ifdef __GLIBC__
- __BEGIN_DECLS
-+#elif defined(__cplusplus)
-+extern "C" {
-+#endif
- void des_setparity( char *);
-+#ifdef __GLIBC__
- __END_DECLS
-+#elif defined(__cplusplus)
-+}
-+#endif
- 
- #endif  /* _DES_DES_CRYPT_H */
---- ./tirpc/rpc/rpcb_clnt.h.orig	2014-11-28 09:16:53.979289976 +0000
-+++ ./tirpc/rpc/rpcb_clnt.h	2014-11-28 09:16:53.979289976 +0000
-@@ -59,7 +59,11 @@
- 
- #include <rpc/types.h>
- #include <rpc/rpcb_prot.h>
-+#ifdef __GLIBC__
- __BEGIN_DECLS
-+#elif defined(__cplusplus)
-+extern "C" {
-+#endif
- extern bool_t rpcb_set(const rpcprog_t, const rpcvers_t,
- 		       const struct netconfig  *, const struct netbuf *);
- extern bool_t rpcb_unset(const rpcprog_t, const rpcvers_t,
-@@ -78,6 +82,10 @@ extern bool_t rpcb_getaddr(const rpcprog
- extern bool_t rpcb_gettime(const char *, time_t *);
- extern char *rpcb_taddr2uaddr(struct netconfig *, struct netbuf *);
- extern struct netbuf *rpcb_uaddr2taddr(struct netconfig *, char *);
-+#ifdef __GLIBC__
- __END_DECLS
-+#elif defined(__cplusplus)
-+}
-+#endif
- 
- #endif	/* !_RPC_RPCB_CLNT_H */
---- ./tirpc/rpc/clnt.h.orig	2014-11-28 09:16:53.984289976 +0000
-+++ ./tirpc/rpc/clnt.h	2014-11-28 09:16:53.985289976 +0000
-@@ -269,7 +269,11 @@ struct rpc_timers {
-  * Generic client creation routine. Supported protocols are those that
-  * belong to the nettype namespace (/etc/netconfig).
-  */
-+#ifdef __GLIBC__
- __BEGIN_DECLS
-+#elif defined(__cplusplus)
-+extern "C" {
-+#endif
- extern CLIENT *clnt_create(const char *, const rpcprog_t, const rpcvers_t,
- 			   const char *);
- /*
-@@ -416,32 +420,60 @@ extern CLIENT *clnt_dg_create(const int,
-  */
- extern CLIENT *clnt_raw_create(rpcprog_t, rpcvers_t);
- 
-+#ifdef __GLIBC__
- __END_DECLS
-+#elif defined(__cplusplus)
-+}
-+#endif
- 
- 
- /*
-  * Print why creation failed
-  */
-+#ifdef __GLIBC__
- __BEGIN_DECLS
-+#elif defined(__cplusplus)
-+extern "C" {
-+#endif
- extern void clnt_pcreateerror(const char *);			/* stderr */
- extern char *clnt_spcreateerror(const char *);			/* string */
-+#ifdef __GLIBC__
- __END_DECLS
-+#elif defined(__cplusplus)
-+}
-+#endif
- 
- /*
-  * Like clnt_perror(), but is more verbose in its output
-  */
-+#ifdef __GLIBC__
- __BEGIN_DECLS
-+#elif defined(__cplusplus)
-+extern "C" {
-+#endif
- extern void clnt_perrno(enum clnt_stat);		/* stderr */
- extern char *clnt_sperrno(enum clnt_stat);		/* string */
-+#ifdef __GLIBC__
- __END_DECLS
-+#elif defined(__cplusplus)
-+}
-+#endif
- 
- /*
-  * Print an English error message, given the client error code
-  */
-+#ifdef __GLIBC__
- __BEGIN_DECLS
-+#elif defined(__cplusplus)
-+extern "C" {
-+#endif
- extern void clnt_perror(CLIENT *, const char *);	 	/* stderr */
- extern char *clnt_sperror(CLIENT *, const char *);		/* string */
-+#ifdef __GLIBC__
- __END_DECLS
-+#elif defined(__cplusplus)
-+}
-+#endif
- 
- 
- /*
-@@ -452,9 +484,17 @@ struct rpc_createerr {
- 	struct rpc_err cf_error; /* useful when cf_stat == RPC_PMAPFAILURE */
- };
- 
-+#ifdef __GLIBC__
- __BEGIN_DECLS
-+#elif defined(__cplusplus)
-+extern "C" {
-+#endif
- extern struct rpc_createerr	*__rpc_createerr(void);
-+#ifdef __GLIBC__
- __END_DECLS
-+#elif defined(__cplusplus)
-+}
-+#endif
- #define get_rpc_createerr()	(*(__rpc_createerr()))
- #define rpc_createerr		(*(__rpc_createerr()))
- 
-@@ -471,12 +511,20 @@ __END_DECLS
-  *	char *out;
-  *	const char *nettype;
-  */
-+#ifdef __GLIBC__
- __BEGIN_DECLS
-+#elif defined(__cplusplus)
-+extern "C" {
-+#endif
- extern enum clnt_stat rpc_call(const char *, const rpcprog_t,
- 			       const rpcvers_t, const rpcproc_t,
- 			       const xdrproc_t, const char *,
- 			       const xdrproc_t, char *, const char *);
-+#ifdef __GLIBC__
- __END_DECLS
-+#elif defined(__cplusplus)
-+}
-+#endif
- 
- /*
-  * RPC broadcast interface
-@@ -524,7 +572,11 @@ __END_DECLS
- 
- typedef bool_t (*resultproc_t)(caddr_t, ...);
- 
-+#ifdef __GLIBC__
- __BEGIN_DECLS
-+#elif defined(__cplusplus)
-+extern "C" {
-+#endif
- extern enum clnt_stat rpc_broadcast(const rpcprog_t, const rpcvers_t,
- 				    const rpcproc_t, const xdrproc_t,
- 				    caddr_t, const xdrproc_t, caddr_t,
-@@ -534,7 +586,11 @@ extern enum clnt_stat rpc_broadcast_exp(
- 					caddr_t, const xdrproc_t, caddr_t,
- 					const resultproc_t, const int,
- 					const int, const char *);
-+#ifdef __GLIBC__
- __END_DECLS
-+#elif defined(__cplusplus)
-+}
-+#endif
- 
- /* For backward compatibility */
- #include <rpc/clnt_soc.h>
---- ./tirpc/rpc/rpcent.h.orig	2014-11-28 09:16:53.996289976 +0000
-+++ ./tirpc/rpc/rpcent.h	2014-11-28 09:16:53.996289976 +0000
-@@ -44,7 +44,11 @@
- /*	#pragma ident "@(#)rpcent.h   1.13    94/04/25 SMI"	*/
- /*      @(#)rpcent.h 1.1 88/12/06 SMI   */
- 
-+#ifdef __GLIBC__
- __BEGIN_DECLS
-+#elif defined(__cplusplus)
-+extern "C" {
-+#endif
- 
- /* These are defined in /usr/include/rpc/netdb.h */
- #if 0
-@@ -62,6 +66,10 @@ extern struct rpcent *getrpcent(void);
- 
- extern void setrpcent(int) __THROW;
- extern void endrpcent(void) __THROW;
-+#ifdef __GLIBC__
- __END_DECLS
-+#elif defined(__cplusplus)
-+}
-+#endif
- 
- #endif /* !_RPC_CENT_H */
---- ./tirpc/rpc/pmap_clnt.h.orig	2014-11-28 09:16:53.980289976 +0000
-+++ ./tirpc/rpc/pmap_clnt.h	2014-11-28 09:16:53.980289976 +0000
-@@ -67,7 +67,11 @@
- #include <sys/cdefs.h>
- #endif
- 
-+#ifdef __GLIBC__
- __BEGIN_DECLS
-+#elif defined(__cplusplus)
-+extern "C" {
-+#endif
- extern bool_t		pmap_set(u_long, u_long, int, int);
- extern bool_t		pmap_unset(u_long, u_long);
- extern struct pmaplist	*pmap_getmaps(struct sockaddr_in *);
-@@ -82,6 +86,10 @@ extern enum clnt_stat	clnt_broadcast(u_l
- 				       resultproc_t);
- extern u_short		pmap_getport(struct sockaddr_in *,
- 				     u_long, u_long, u_int);
-+#ifdef __GLIBC__
- __END_DECLS
-+#elif defined(__cplusplus)
-+}
-+#endif
- 
- #endif /* !_RPC_PMAP_CLNT_H_ */
---- ./tirpc/rpc/auth_gss.h.orig	2014-11-28 09:16:53.989289976 +0000
-+++ ./tirpc/rpc/auth_gss.h	2014-11-28 09:16:53.990289976 +0000
-@@ -104,7 +104,11 @@ struct rpc_gss_init_res {
- #define MAXSEQ		0x80000000
- 
- /* Prototypes. */
-+#ifdef __GLIBC__
- __BEGIN_DECLS
-+#elif defined(__cplusplus)
-+extern "C" {
-+#endif
- bool_t	xdr_rpc_gss_cred	__P((XDR *xdrs, struct rpc_gss_cred *p));
- bool_t	xdr_rpc_gss_init_args	__P((XDR *xdrs, gss_buffer_desc *p));
- bool_t	xdr_rpc_gss_init_res	__P((XDR *xdrs, struct rpc_gss_init_res *p));
-@@ -126,6 +130,10 @@ void	gss_log_status		__P((char *m, OM_ui
- 				     OM_uint32 minor));
- void	gss_log_hexdump		__P((const u_char *buf, int len, int offset));
- 
-+#ifdef __GLIBC__
- __END_DECLS
-+#elif defined(__cplusplus)
-+}
-+#endif
- 
- #endif /* !_TIRPC_AUTH_GSS_H */
---- ./tirpc/rpc/rpc_msg.h.orig	2014-11-28 09:16:53.996289976 +0000
-+++ ./tirpc/rpc/rpc_msg.h	2014-11-28 09:16:53.997289976 +0000
-@@ -161,7 +161,11 @@ struct rpc_msg {
- #define	acpted_rply	ru.RM_rmb.ru.RP_ar
- #define	rjcted_rply	ru.RM_rmb.ru.RP_dr
- 
-+#ifdef __GLIBC__
- __BEGIN_DECLS
-+#elif defined(__cplusplus)
-+extern "C" {
-+#endif
- /*
-  * XDR routine to handle a rpc message.
-  * xdr_callmsg(xdrs, cmsg)
-@@ -210,6 +214,10 @@ extern bool_t	xdr_rejected_reply(XDR *,
-  * 	struct rpc_err *error;
-  */
- extern void	_seterr_reply(struct rpc_msg *, struct rpc_err *);
-+#ifdef __GLIBC__
- __END_DECLS
-+#elif defined(__cplusplus)
-+}
-+#endif
- 
- #endif /* !_TIRPC_RPC_MSG_H */
---- ./tirpc/rpc/nettype.h.orig	2014-11-28 09:16:53.981289976 +0000
-+++ ./tirpc/rpc/nettype.h	2014-11-28 09:16:53.982289976 +0000
-@@ -53,11 +53,19 @@
- #define	_RPC_TCP	7
- #define	_RPC_UDP	8
- 
-+#ifdef __GLIBC__
- __BEGIN_DECLS
-+#elif defined(__cplusplus)
-+extern "C" {
-+#endif
- extern void *__rpc_setconf(const char *);
- extern void __rpc_endconf(void *);
- extern struct netconfig *__rpc_getconf(void *);
- extern struct netconfig *__rpc_getconfip(const char *);
-+#ifdef __GLIBC__
- __END_DECLS
-+#elif defined(__cplusplus)
-+}
-+#endif
- 
- #endif	/* !_TIRPC_NETTYPE_H */
---- ./tirpc/rpc/svc_auth.h.orig	2014-11-28 09:16:53.986289976 +0000
-+++ ./tirpc/rpc/svc_auth.h	2014-11-28 09:16:53.987289976 +0000
-@@ -65,13 +65,21 @@ typedef struct SVCAUTH {
- /*
-  * Server side authenticator
-  */
-+#ifdef __GLIBC__
- __BEGIN_DECLS
-+#elif defined(__cplusplus)
-+extern "C" {
-+#endif
- extern enum auth_stat _gss_authenticate(struct svc_req *, struct rpc_msg *,
- 		bool_t *);
- extern enum auth_stat _authenticate(struct svc_req *, struct rpc_msg *);
- extern int svc_auth_reg(int, enum auth_stat (*)(struct svc_req *,
- 			  struct rpc_msg *));
- 
-+#ifdef __GLIBC__
- __END_DECLS
-+#elif defined(__cplusplus)
-+}
-+#endif
- 
- #endif /* !_RPC_SVC_AUTH_H */
---- ./tirpc/rpcsvc/nis.h.orig	2014-11-28 09:16:54.001289976 +0000
-+++ ./tirpc/rpcsvc/nis.h	2014-11-28 09:16:54.002289976 +0000
-@@ -36,7 +36,11 @@
- #include <rpc/rpc.h>
- #include <rpcsvc/nis_tags.h>
- 
-+#ifdef __GLIBC__
- __BEGIN_DECLS
-+#elif defined(__cplusplus)
-+extern "C" {
-+#endif
- 
- /*
-  *	nis.h
-@@ -611,6 +615,10 @@ extern  nis_error * nis_rmdir_3_svc (nis
- extern  nis_error * nis_updkeys_3 (nis_name *, CLIENT *) __THROW;
- extern  nis_error * nis_updkeys_3_svc (nis_name *, struct svc_req *) __THROW;
- 
-+#ifdef __GLIBC__
- __END_DECLS
-+#elif defined(__cplusplus)
-+}
-+#endif
- 
- #endif /* ! _RPCSVC_NIS_H */
---- ./tirpc/rpcsvc/nislib.h.orig	2014-11-28 09:16:53.999289976 +0000
-+++ ./tirpc/rpcsvc/nislib.h	2014-11-28 09:16:54.000289976 +0000
-@@ -23,7 +23,11 @@
- 
- #include <features.h>
- 
-+#ifdef __GLIBC__
- __BEGIN_DECLS
-+#elif defined(__cplusplus)
-+extern "C" {
-+#endif
- 
- typedef const char *const_nis_name;
- 
-@@ -283,6 +287,10 @@ extern nis_error __nisfind_server (const
- 
- #endif
- 
-+#ifdef __GLIBC__
- __END_DECLS
-+#elif defined(__cplusplus)
-+}
-+#endif
- 
- #endif	/* __RPCSVC_NISLIB_H__ */
---- ./tirpc/netconfig.h.orig	2014-11-28 09:16:54.003289976 +0000
-+++ ./tirpc/netconfig.h	2014-11-28 09:16:54.003289976 +0000
-@@ -74,7 +74,11 @@ typedef struct {
- #define NC_UDP		"udp"
- #define NC_ICMP		"icmp"
- 
-+#ifdef __GLIBC__
- __BEGIN_DECLS
-+#elif defined(__cplusplus)
-+extern "C" {
-+#endif
- 
- extern void *setnetconfig (void);
- extern struct netconfig *getnetconfig (void *);
-@@ -89,6 +93,10 @@ extern int endnetpath (void *);
- extern void nc_perror (const char *);
- extern char *nc_sperror (void);
- 
-+#ifdef __GLIBC__
- __END_DECLS
-+#elif defined(__cplusplus)
-+}
-+#endif
- 
- #endif /* _NETCONFIG_H_ */
---- ./src/rpc_com.h.orig	2014-11-28 09:16:53.975289976 +0000
-+++ ./src/rpc_com.h	2014-11-28 09:16:53.975289976 +0000
-@@ -56,7 +56,11 @@
- #define __RPC_GETXID(now) ((u_int32_t)getpid() ^ (u_int32_t)(now)->tv_sec ^ \
-     (u_int32_t)(now)->tv_usec)
- 
-+#ifdef __GLIBC__
- __BEGIN_DECLS
-+#elif defined(__cplusplus)
-+extern "C" {
-+#endif
- extern u_int __rpc_get_a_size(int);
- extern int __rpc_dtbsize(void);
- extern struct netconfig * __rpcgettp(int);
-@@ -92,6 +96,10 @@ void __xprt_set_raddr(SVCXPRT *, const s
- SVCXPRT **__svc_xports;
- int __svc_maxrec;
- 
-+#ifdef __GLIBC__
- __END_DECLS
-+#elif defined(__cplusplus)
-+}
-+#endif
- 
- #endif /* _TIRPC_RPCCOM_H */

diff --git a/net-libs/libtirpc/files/0005-fix_remaining_issues.patch b/net-libs/libtirpc/files/0005-fix_remaining_issues.patch
deleted file mode 100644
index 538e79e..0000000
--- a/net-libs/libtirpc/files/0005-fix_remaining_issues.patch
+++ /dev/null
@@ -1,14 +0,0 @@
---- ./tirpc/rpc/rpcent.h	2014-11-21 21:33:50.421928818 +0000
-+++ ./tirpc/rpc/rpcent.h	2014-11-21 21:35:05.140928818 +0000
-@@ -64,6 +64,10 @@ extern struct rpcent *getrpcbynumber(int
- extern struct rpcent *getrpcent(void);
- #endif
- 
-+#ifndef __GLIBC__
-+#define __THROW
-+#endif
-+
- extern void setrpcent(int) __THROW;
- extern void endrpcent(void) __THROW;
- #ifdef __GLIBC__
- 

diff --git a/net-libs/libtirpc/files/0007-no-des.patch b/net-libs/libtirpc/files/0007-no-des.patch
deleted file mode 100644
index 4347261..0000000
--- a/net-libs/libtirpc/files/0007-no-des.patch
+++ /dev/null
@@ -1,29 +0,0 @@
---- libtirpc-0.2.5.orig/src/Makefile.am
-+++ libtirpc-0.2.5/src/Makefile.am
-@@ -51,7 +51,7 @@
-         rpc_callmsg.c rpc_generic.c rpc_soc.c rpcb_clnt.c rpcb_prot.c \
-         rpcb_st_xdr.c svc.c svc_auth.c svc_dg.c svc_auth_unix.c svc_auth_none.c \
-         svc_generic.c svc_raw.c svc_run.c svc_simple.c svc_vc.c getpeereid.c \
--        auth_time.c auth_des.c authdes_prot.c debug.c
-+        auth_time.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-0.2.5.orig/src/rpc_soc.c
-+++ libtirpc-0.2.5/src/rpc_soc.c
-@@ -520,6 +520,7 @@
- 	    (resultproc_t) rpc_wrap_bcast, "udp");
- }
- 
-+#if 0
- /*
-  * Create the client des authentication object. Obsoleted by
-  * authdes_seccreate().
-@@ -551,6 +552,7 @@
- 	dummy = authdes_seccreate(servername, window, NULL, ckey);
- 	return (dummy);
- }
-+#endif
- 
- /*
-  * Create a client handle for a unix connection. Obsoleted by clnt_vc_create()

diff --git a/net-libs/libtirpc/files/git.patch b/net-libs/libtirpc/files/git.patch
deleted file mode 100644
index e458563..0000000
--- a/net-libs/libtirpc/files/git.patch
+++ /dev/null
@@ -1,842 +0,0 @@
-diff --git a/.gitignore b/.gitignore
-index b7814a3..ef97e01 100644
---- a/.gitignore
-+++ b/.gitignore
-@@ -34,6 +34,9 @@ libtirpc.pc
- lib*.a
- src/libtirpc.la
- src/libtirpc_la-*.lo
-+tirpc/stamp-h2
-+tirpc/tirpc-features.h
-+
- # generic editor backup et al
- *~
- .stgitmail.txt
-diff --git a/src/Makefile.am b/src/Makefile.am
-index e4ed8aa..fba2aa4 100644
---- a/src/Makefile.am
-+++ b/src/Makefile.am
-@@ -24,7 +24,7 @@ libtirpc_la_SOURCES = auth_none.c auth_unix.c authunix_prot.c bindresvport.c cln
-         rpcb_st_xdr.c svc.c svc_auth.c svc_dg.c svc_auth_unix.c svc_auth_none.c \
- 	svc_auth_des.c \
-         svc_generic.c svc_raw.c svc_run.c svc_simple.c svc_vc.c getpeereid.c \
--        auth_time.c auth_des.c authdes_prot.c debug.c
-+        auth_time.c auth_des.c authdes_prot.c debug.c des_crypt.c des_impl.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 xdr_sizeof.c
-diff --git a/src/auth_des.c b/src/auth_des.c
-index 4d3639e..af2f61f 100644
---- a/src/auth_des.c
-+++ b/src/auth_des.c
-@@ -46,8 +46,8 @@
- #include <rpc/clnt.h>
- #include <rpc/xdr.h>
- #include <sys/socket.h>
--#undef NIS
--#include <rpcsvc/nis.h>
-+
-+#include "nis.h"
- 
- #if defined(LIBC_SCCS) && !defined(lint)
- #endif
-diff --git a/src/auth_gss.c b/src/auth_gss.c
-index 9b88c38..5959893 100644
---- a/src/auth_gss.c
-+++ b/src/auth_gss.c
-@@ -526,6 +526,14 @@ _rpc_gss_refresh(AUTH *auth, rpc_gss_options_ret_t *options_ret)
- 			     gr.gr_major != GSS_S_CONTINUE_NEEDED)) {
- 				options_ret->major_status = gr.gr_major;
- 				options_ret->minor_status = gr.gr_minor;
-+				if (call_stat != RPC_SUCCESS) {
-+					struct rpc_err err;
-+					clnt_geterr(gd->clnt, &err);
-+					LIBTIRPC_DEBUG(1, ("authgss_refresh: %s errno: %s",
-+						clnt_sperrno(call_stat), strerror(err.re_errno)));
-+				} else
-+					gss_log_status("authgss_refresh:", 
-+						gr.gr_major, gr.gr_minor);
- 				return FALSE;
- 			}
- 
-diff --git a/src/auth_time.c b/src/auth_time.c
-index 10e58eb..7f83ab4 100644
---- a/src/auth_time.c
-+++ b/src/auth_time.c
-@@ -44,8 +44,8 @@
- #include <rpc/rpcb_prot.h>
- //#include <clnt_soc.h>
- #include <sys/select.h>
--#undef NIS
--#include <rpcsvc/nis.h>
-+
-+#include "nis.h"
- 
- 
- #ifdef TESTING
-diff --git a/src/clnt_vc.c b/src/clnt_vc.c
-index a72f9f7..a5fbe2f 100644
---- a/src/clnt_vc.c
-+++ b/src/clnt_vc.c
-@@ -72,6 +72,8 @@
- #define CMGROUP_MAX    16
- #define SCM_CREDS      0x03            /* process creds (struct cmsgcred) */
- 
-+#undef rpc_createerr                   /* make it clear it is a thread safe variable */
-+
- /*
-  * Credentials structure, used to verify the identity of a peer
-  * process that has sent us a message. This is allocated by the
-@@ -188,10 +190,11 @@ clnt_vc_create(fd, raddr, prog, vers, sendsz, recvsz)
- 	cl = (CLIENT *)mem_alloc(sizeof (*cl));
- 	ct = (struct ct_data *)mem_alloc(sizeof (*ct));
- 	if ((cl == (CLIENT *)NULL) || (ct == (struct ct_data *)NULL)) {
-+		struct rpc_createerr *ce = &get_rpc_createerr();
-+		ce->cf_stat = RPC_SYSTEMERROR;
-+		ce->cf_error.re_errno = errno;
- 		(void) syslog(LOG_ERR, clnt_vc_errstr,
- 		    clnt_vc_str, __no_mem_str);
--		rpc_createerr.cf_stat = RPC_SYSTEMERROR;
--		rpc_createerr.cf_error.re_errno = errno;
- 		goto err;
- 	}
- 	ct->ct_addr.buf = NULL;
-@@ -230,26 +233,29 @@ clnt_vc_create(fd, raddr, prog, vers, sendsz, recvsz)
- 		assert(vc_cv != (cond_t *) NULL);
- 
- 	/*
--	 * XXX - fvdl connecting while holding a mutex?
-+	 * Do not hold mutex during connect
- 	 */
-+	mutex_unlock(&clnt_fd_lock);
-+
- 	slen = sizeof ss;
- 	if (getpeername(fd, (struct sockaddr *)&ss, &slen) < 0) {
- 		if (errno != ENOTCONN) {
--			rpc_createerr.cf_stat = RPC_SYSTEMERROR;
--			rpc_createerr.cf_error.re_errno = errno;
--			mutex_unlock(&clnt_fd_lock);
-+			struct rpc_createerr *ce = &get_rpc_createerr();
-+			ce->cf_stat = RPC_SYSTEMERROR;
-+			ce->cf_error.re_errno = errno;
- 			thr_sigsetmask(SIG_SETMASK, &(mask), NULL);
- 			goto err;
- 		}
- 		if (connect(fd, (struct sockaddr *)raddr->buf, raddr->len) < 0){
--			rpc_createerr.cf_stat = RPC_SYSTEMERROR;
--			rpc_createerr.cf_error.re_errno = errno;
--			mutex_unlock(&clnt_fd_lock);
--			thr_sigsetmask(SIG_SETMASK, &(mask), NULL);
--			goto err;
-+			if (errno != EISCONN) {
-+				struct rpc_createerr *ce = &get_rpc_createerr();
-+				ce->cf_stat = RPC_SYSTEMERROR;
-+				ce->cf_error.re_errno = errno;
-+				thr_sigsetmask(SIG_SETMASK, &(mask), NULL);
-+				goto err;
-+			}
- 		}
- 	}
--	mutex_unlock(&clnt_fd_lock);
- 	if (!__rpc_fd2sockinfo(fd, &si))
- 		goto err;
- 	thr_sigsetmask(SIG_SETMASK, &(mask), NULL);
-diff --git a/src/des_impl.c b/src/des_impl.c
-index c5b7ed6..15bec2a 100644
---- a/src/des_impl.c
-+++ b/src/des_impl.c
-@@ -6,7 +6,8 @@
- /* see <http://www.gnu.org/licenses/> to obtain a copy.  */
- #include <string.h>
- #include <stdint.h>
--#include <rpc/rpc_des.h>
-+#include <sys/types.h>
-+#include <rpc/des.h>
- 
- 
- static const uint32_t des_SPtrans[8][64] =
-@@ -587,7 +588,7 @@ _des_crypt (char *buf, unsigned len, struct desparams *desp)
-     }
-   tin0 = tin1 = tout0 = tout1 = xor0 = xor1 = 0;
-   tbuf[0] = tbuf[1] = 0;
--  __bzero (schedule, sizeof (schedule));
-+  memset (schedule, 0, sizeof (schedule));
- 
-   return (1);
- }
-diff --git a/src/getpublickey.c b/src/getpublickey.c
-index 764a5f9..8cf4dc2 100644
---- a/src/getpublickey.c
-+++ b/src/getpublickey.c
-@@ -38,8 +38,10 @@
- #include <pwd.h>
- #include <rpc/rpc.h>
- #include <rpc/key_prot.h>
-+#ifdef YP
- #include <rpcsvc/yp_prot.h>
- #include <rpcsvc/ypclnt.h>
-+#endif
- #include <string.h>
- #include <stdlib.h>
- 
-diff --git a/src/getrpcport.c b/src/getrpcport.c
-index b452c99..c28cd61 100644
---- a/src/getrpcport.c
-+++ b/src/getrpcport.c
-@@ -57,8 +57,8 @@ getrpcport(host, prognum, versnum, proto)
- 	memset(&addr, 0, sizeof(addr));
- 	addr.sin_family = AF_INET;
- 	addr.sin_port =  0;
--	if (hp->h_length > sizeof(addr))
--	  hp->h_length = sizeof(addr);
-+	if (hp->h_length > sizeof(addr.sin_addr.s_addr))
-+		hp->h_length = sizeof(addr.sin_addr.s_addr);
- 	memcpy(&addr.sin_addr.s_addr, hp->h_addr, (size_t)hp->h_length);
- 	/* Inconsistent interfaces need casts! :-( */
- 	return (pmap_getport(&addr, (u_long)prognum, (u_long)versnum, 
-diff --git a/src/nis.h b/src/nis.h
-new file mode 100644
-index 0000000..588c041
---- /dev/null
-+++ b/src/nis.h
-@@ -0,0 +1,70 @@
-+/*
-+ * Copyright (c) 2010, Oracle America, Inc.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are
-+ * met:
-+ *
-+ *     * Redistributions of source code must retain the above copyright
-+ *       notice, this list of conditions and the following disclaimer.
-+ *     * Redistributions in binary form must reproduce the above
-+ *       copyright notice, this list of conditions and the following
-+ *       disclaimer in the documentation and/or other materials
-+ *       provided with the distribution.
-+ *     * Neither the name of the "Oracle America, Inc." nor the names of its
-+ *       contributors may be used to endorse or promote products derived
-+ *       from this software without specific prior written permission.
-+ *
-+ *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-+ *   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-+ *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-+ *   FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-+ *   COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-+ *   INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-+ *   DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
-+ *   GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-+ *   INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-+ *   WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-+ *   NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-+ *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-+ */
-+
-+#ifndef _INTERNAL_NIS_H
-+#define _INTERNAL_NIS_H 1
-+
-+/*  This file only contains the definition of nis_server, to be
-+    able to compile libtirpc without the need to have a glibc
-+    with sunrpc or a libnsl already installed. */
-+
-+#define NIS_PK_NONE 0
-+
-+struct nis_attr {
-+	char *zattr_ndx;
-+	struct {
-+		u_int zattr_val_len;
-+		char *zattr_val_val;
-+	} zattr_val;
-+};
-+typedef struct nis_attr nis_attr;
-+
-+typedef char *nis_name;
-+
-+struct endpoint {
-+	char *uaddr;
-+	char *family;
-+	char *proto;
-+};
-+typedef struct endpoint endpoint;
-+
-+struct nis_server {
-+	nis_name name;
-+	struct {
-+		u_int ep_len;
-+		endpoint *ep_val;
-+	} ep;
-+	uint32_t key_type;
-+	netobj pkey;
-+};
-+typedef struct nis_server nis_server;
-+
-+#endif /* ! _INTERNAL_NIS_H */
-diff --git a/src/rpc_dtablesize.c b/src/rpc_dtablesize.c
-index 13d320c..3fe503a 100644
---- a/src/rpc_dtablesize.c
-+++ b/src/rpc_dtablesize.c
-@@ -27,22 +27,14 @@
-  */
- 
- #include <unistd.h>
--
- #include <sys/select.h>
--
--int _rpc_dtablesize(void);	/* XXX */
-+#include <rpc/clnt.h>
-+#include <rpc/rpc_com.h>
- 
- /*
-  * Cache the result of getdtablesize(), so we don't have to do an
-  * expensive system call every time.
-  */
--/*
-- * XXX In FreeBSD 2.x, you can have the maximum number of open file
-- * descriptors be greater than FD_SETSIZE (which us 256 by default).
-- *
-- * Since old programs tend to use this call to determine the first arg
-- * for _select(), having this return > FD_SETSIZE is a Bad Idea(TM)!
-- */
- int
- _rpc_dtablesize(void)
- {
-diff --git a/src/rpc_soc.c b/src/rpc_soc.c
-index 1ec7b3f..ed0892a 100644
---- a/src/rpc_soc.c
-+++ b/src/rpc_soc.c
-@@ -61,8 +61,8 @@
- #include <string.h>
- #include <unistd.h>
- #include <fcntl.h>
--#include <rpcsvc/nis.h>
- 
-+#include "nis.h"
- #include "rpc_com.h"
- 
- extern mutex_t	rpcsoc_lock;
-diff --git a/src/rtime.c b/src/rtime.c
-index c34e0af..b642840 100644
---- a/src/rtime.c
-+++ b/src/rtime.c
-@@ -46,6 +46,7 @@
- #include <unistd.h>
- #include <errno.h>
- #include <sys/types.h>
-+#include <sys/poll.h>
- #include <sys/socket.h>
- #include <sys/time.h>
- #include <netinet/in.h>
-@@ -67,7 +68,8 @@ rtime(addrp, timep, timeout)
- 	struct timeval *timeout;
- {
- 	int s;
--	fd_set readfds;
-+	struct pollfd fd;
-+	int milliseconds;
- 	int res;
- 	unsigned long thetime;
- 	struct sockaddr_in from;
-@@ -94,31 +96,32 @@ rtime(addrp, timep, timeout)
- 	addrp->sin_port = serv->s_port;
- 
- 	if (type == SOCK_DGRAM) {
--		res = sendto(s, (char *)&thetime, sizeof(thetime), 0, 
-+		res = sendto(s, (char *)&thetime, sizeof(thetime), 0,
- 			     (struct sockaddr *)addrp, sizeof(*addrp));
- 		if (res < 0) {
- 			do_close(s);
--			return(-1);	
-+			return(-1);
- 		}
--		do {
--			FD_ZERO(&readfds);
--			FD_SET(s, &readfds);
--			res = select(_rpc_dtablesize(), &readfds,
--				     (fd_set *)NULL, (fd_set *)NULL, timeout);
--		} while (res < 0 && errno == EINTR);
-+
-+		milliseconds = (timeout->tv_sec * 1000) + (timeout->tv_usec / 1000);
-+		fd.fd = s;
-+		fd.events = POLLIN;
-+		do
-+		  res = poll (&fd, 1, milliseconds);
-+		while (res < 0 && errno == EINTR);
- 		if (res <= 0) {
- 			if (res == 0) {
- 				errno = ETIMEDOUT;
- 			}
- 			do_close(s);
--			return(-1);	
-+			return(-1);
- 		}
- 		fromlen = sizeof(from);
--		res = recvfrom(s, (char *)&thetime, sizeof(thetime), 0, 
-+		res = recvfrom(s, (char *)&thetime, sizeof(thetime), 0,
- 			       (struct sockaddr *)&from, &fromlen);
- 		do_close(s);
- 		if (res < 0) {
--			return(-1);	
-+			return(-1);
- 		}
- 	} else {
- 		if (connect(s, (struct sockaddr *)addrp, sizeof(*addrp)) < 0) {
-diff --git a/src/svc.c b/src/svc.c
-index 9c41445..b59467b 100644
---- a/src/svc.c
-+++ b/src/svc.c
-@@ -99,7 +99,7 @@ xprt_register (xprt)
-     {
-       __svc_xports = (SVCXPRT **) calloc (_rpc_dtablesize(), sizeof (SVCXPRT *));
-       if (__svc_xports == NULL)
--	return;
-+            goto unlock;
-     }
-   if (sock < _rpc_dtablesize())
-     {
-@@ -120,14 +120,14 @@ xprt_register (xprt)
-             svc_pollfd[i].fd = sock;
-             svc_pollfd[i].events = (POLLIN | POLLPRI |
-                                     POLLRDNORM | POLLRDBAND);
--            return;
-+            goto unlock;
-           }
- 
-       new_svc_pollfd = (struct pollfd *) realloc (svc_pollfd,
-                                                   sizeof (struct pollfd)
-                                                   * (svc_max_pollfd + 1));
-       if (new_svc_pollfd == NULL) /* Out of memory */
--        return;
-+        goto unlock;
-       svc_pollfd = new_svc_pollfd;
-       ++svc_max_pollfd;
- 
-@@ -135,6 +135,7 @@ xprt_register (xprt)
-       svc_pollfd[svc_max_pollfd - 1].events = (POLLIN | POLLPRI |
-                                                POLLRDNORM | POLLRDBAND);
-     }
-+unlock:
-   rwlock_unlock (&svc_fd_lock);
- }
- 
-diff --git a/src/svc_auth_des.c b/src/svc_auth_des.c
-index 5bc264c..2e90146 100644
---- a/src/svc_auth_des.c
-+++ b/src/svc_auth_des.c
-@@ -86,13 +86,13 @@ static struct cache_entry *authdes_cache/* [AUTHDES_CACHESZ] */;
- static short *authdes_lru/* [AUTHDES_CACHESZ] */;
- 
- static void cache_init();	/* initialize the cache */
--static short cache_spot();	/* find an entry in the cache */
--static void cache_ref(/*short sid*/);	/* note that sid was ref'd */
-+static short cache_spot(des_block *key, char *name, struct timeval *timestamp);  /* find an entry in the cache */
-+static void cache_ref(short sid);	/* note that sid was ref'd */
- 
--static void invalidate();	/* invalidate entry in cache */
-+static void invalidate(char *cred);	/* invalidate entry in cache */
- 
- /*
-- * cache statistics 
-+ * cache statistics
-  */
- static struct {
- 	u_long ncachehits;	/* times cache hit, and is not replay */
-diff --git a/src/svc_auth_gss.c b/src/svc_auth_gss.c
-index b6aa407..bece46a 100644
---- a/src/svc_auth_gss.c
-+++ b/src/svc_auth_gss.c
-@@ -129,6 +129,8 @@ struct svc_rpc_gss_data {
- 	((struct svc_rpc_gss_data *)(auth)->svc_ah_private)
- 
- /* Global server credentials. */
-+static u_int		_svcauth_req_time = 0;
-+static gss_OID_set_desc	_svcauth_oid_set = {1, GSS_C_NULL_OID };
- static gss_cred_id_t	_svcauth_gss_creds;
- static gss_name_t	_svcauth_gss_name = GSS_C_NO_NAME;
- static char *		_svcauth_svc_name = NULL;
-@@ -167,6 +169,7 @@ svcauth_gss_import_name(char *service)
- 	gss_name_t	name;
- 	gss_buffer_desc	namebuf;
- 	OM_uint32	maj_stat, min_stat;
-+	bool_t		result;
- 
- 	gss_log_debug("in svcauth_gss_import_name()");
- 
-@@ -181,22 +184,21 @@ svcauth_gss_import_name(char *service)
- 			maj_stat, min_stat);
- 		return (FALSE);
- 	}
--	if (svcauth_gss_set_svc_name(name) != TRUE) {
--		gss_release_name(&min_stat, &name);
--		return (FALSE);
--	}
--	return (TRUE);
-+	result = svcauth_gss_set_svc_name(name);
-+	gss_release_name(&min_stat, &name);
-+	return result;
- }
- 
- static bool_t
--svcauth_gss_acquire_cred(u_int req_time, gss_OID_set_desc *oid_set)
-+svcauth_gss_acquire_cred(void)
- {
- 	OM_uint32	maj_stat, min_stat;
- 
- 	gss_log_debug("in svcauth_gss_acquire_cred()");
- 
--	maj_stat = gss_acquire_cred(&min_stat, _svcauth_gss_name, req_time,
--				    oid_set, GSS_C_ACCEPT,
-+	maj_stat = gss_acquire_cred(&min_stat, _svcauth_gss_name,
-+				    _svcauth_req_time, &_svcauth_oid_set,
-+				    GSS_C_ACCEPT,
- 				    &_svcauth_gss_creds, NULL, NULL);
- 
- 	if (maj_stat != GSS_S_COMPLETE) {
-@@ -300,6 +302,8 @@ svcauth_gss_accept_sec_context(struct svc_req *rqst,
- 					      NULL,
- 					      &gd->deleg);
- 
-+	xdr_free((xdrproc_t)xdr_rpc_gss_init_args, (caddr_t)&recv_tok);
-+
- 	if (gr->gr_major != GSS_S_COMPLETE &&
- 	    gr->gr_major != GSS_S_CONTINUE_NEEDED) {
- 		gss_log_status("svcauth_gss_accept_sec_context: accept_sec_context",
-@@ -352,8 +356,11 @@ svcauth_gss_accept_sec_context(struct svc_req *rqst,
- 			return (FALSE);
- 
- 		rqst->rq_xprt->xp_verf.oa_flavor = RPCSEC_GSS;
--		rqst->rq_xprt->xp_verf.oa_base = checksum.value;
-+		memcpy(rqst->rq_xprt->xp_verf.oa_base, checksum.value,
-+			checksum.length);
- 		rqst->rq_xprt->xp_verf.oa_length = checksum.length;
-+
-+		gss_release_buffer(&min_stat, &checksum);
- 	}
- 	return (TRUE);
- }
-@@ -435,10 +442,13 @@ svcauth_gss_nextverf(struct svc_req *rqst, u_int num)
- 			maj_stat, min_stat);
- 		return (FALSE);
- 	}
-+
- 	rqst->rq_xprt->xp_verf.oa_flavor = RPCSEC_GSS;
--	rqst->rq_xprt->xp_verf.oa_base = (caddr_t)checksum.value;
-+	memcpy(rqst->rq_xprt->xp_verf.oa_base, checksum.value, checksum.length);
- 	rqst->rq_xprt->xp_verf.oa_length = (u_int)checksum.length;
- 
-+	gss_release_buffer(&min_stat, &checksum);
-+
- 	return (TRUE);
- }
- 
-@@ -568,6 +578,8 @@ _svcauth_gss(struct svc_req *rqst, struct rpc_msg *msg, bool_t *no_dispatch)
- 	gss_qop_t		 qop;
- 	struct svcauth_gss_cache_entry **ce;
- 	time_t			 now;
-+	enum auth_stat		 result = AUTH_OK;
-+	OM_uint32		 min_stat;
- 
- 	gss_log_debug("in svcauth_gss()");
- 
-@@ -621,19 +633,25 @@ _svcauth_gss(struct svc_req *rqst, struct rpc_msg *msg, bool_t *no_dispatch)
- 	XDR_DESTROY(&xdrs);
- 
- 	/* Check version. */
--	if (gc->gc_v != RPCSEC_GSS_VERSION)
--		return (AUTH_BADCRED);
-+	if (gc->gc_v != RPCSEC_GSS_VERSION) {
-+		result = AUTH_BADCRED;
-+		goto out;
-+	}
- 
- 	/* Check RPCSEC_GSS service. */
- 	if (gc->gc_svc != RPCSEC_GSS_SVC_NONE &&
- 	    gc->gc_svc != RPCSEC_GSS_SVC_INTEGRITY &&
--	    gc->gc_svc != RPCSEC_GSS_SVC_PRIVACY)
--		return (AUTH_BADCRED);
-+	    gc->gc_svc != RPCSEC_GSS_SVC_PRIVACY) {
-+		result = AUTH_BADCRED;
-+		goto out;
-+	}
- 
- 	/* Check sequence number. */
- 	if (gd->established) {
--		if (gc->gc_seq > MAXSEQ)
--			return (RPCSEC_GSS_CTXPROBLEM);
-+		if (gc->gc_seq > MAXSEQ) {
-+			result = RPCSEC_GSS_CTXPROBLEM;
-+			goto out;
-+		}
- 
- 		if ((offset = gd->seqlast - gc->gc_seq) < 0) {
- 			gd->seqlast = gc->gc_seq;
-@@ -643,7 +661,8 @@ _svcauth_gss(struct svc_req *rqst, struct rpc_msg *msg, bool_t *no_dispatch)
- 		}
- 		else if (offset >= gd->win || (gd->seqmask & (1 << offset))) {
- 			*no_dispatch = 1;
--			return (RPCSEC_GSS_CTXPROBLEM);
-+			result = RPCSEC_GSS_CTXPROBLEM;
-+			goto out;
- 		}
- 		gd->seq = gc->gc_seq;
- 		gd->seqmask |= (1 << offset);
-@@ -654,35 +673,52 @@ _svcauth_gss(struct svc_req *rqst, struct rpc_msg *msg, bool_t *no_dispatch)
- 		rqst->rq_svcname = (char *)gd->ctx;
- 	}
- 
-+	rqst->rq_xprt->xp_verf.oa_base = msg->rm_call.cb_verf.oa_base;
-+
- 	/* Handle RPCSEC_GSS control procedure. */
- 	switch (gc->gc_proc) {
- 
- 	case RPCSEC_GSS_INIT:
- 	case RPCSEC_GSS_CONTINUE_INIT:
--		if (rqst->rq_proc != NULLPROC)
--			return (AUTH_FAILED);		/* XXX ? */
-+		if (rqst->rq_proc != NULLPROC) {
-+			result = AUTH_FAILED;		/* XXX ? */
-+			break;
-+		}
- 
- 		if (_svcauth_gss_name == GSS_C_NO_NAME) {
--			if (!svcauth_gss_import_name("nfs"))
--				return (AUTH_FAILED);
-+			if (!svcauth_gss_import_name("nfs")) {
-+				result = AUTH_FAILED;
-+				break;
-+			}
- 		}
- 
--		if (!svcauth_gss_acquire_cred(0, GSS_C_NULL_OID_SET))
--			return (AUTH_FAILED);
-+		if (!svcauth_gss_acquire_cred()) {
-+			result = AUTH_FAILED;
-+			break;
-+		}
- 
--		if (!svcauth_gss_accept_sec_context(rqst, &gr))
--			return (AUTH_REJECTEDCRED);
-+		if (!svcauth_gss_accept_sec_context(rqst, &gr)) {
-+			result = AUTH_REJECTEDCRED;
-+			break;
-+		}
- 
--		if (!svcauth_gss_nextverf(rqst, htonl(gr.gr_win)))
--			return (AUTH_FAILED);
-+		if (!svcauth_gss_nextverf(rqst, htonl(gr.gr_win))) {
-+			result = AUTH_FAILED;
-+			break;
-+		}
- 
- 		*no_dispatch = TRUE;
- 
- 		call_stat = svc_sendreply(rqst->rq_xprt, 
- 			(xdrproc_t)xdr_rpc_gss_init_res, (caddr_t)&gr);
- 
--		if (!call_stat)
--			return (AUTH_FAILED);
-+		gss_release_buffer(&min_stat, &gr.gr_token);
-+		free(gr.gr_ctx.value);
-+
-+		if (!call_stat) {
-+			result = AUTH_FAILED;
-+			break;
-+		}
- 
- 		if (gr.gr_major == GSS_S_COMPLETE)
- 			gd->established = TRUE;
-@@ -690,27 +726,37 @@ _svcauth_gss(struct svc_req *rqst, struct rpc_msg *msg, bool_t *no_dispatch)
- 		break;
- 
- 	case RPCSEC_GSS_DATA:
--		if (!svcauth_gss_validate(gd, msg, &qop))
--			return (RPCSEC_GSS_CREDPROBLEM);
-+		if (!svcauth_gss_validate(gd, msg, &qop)) {
-+			result = RPCSEC_GSS_CREDPROBLEM;
-+			break;
-+		}
- 
--		if (!svcauth_gss_nextverf(rqst, htonl(gc->gc_seq)))
--			return (AUTH_FAILED);
-+		if (!svcauth_gss_nextverf(rqst, htonl(gc->gc_seq))) {
-+			result = AUTH_FAILED;
-+			break;
-+		}
- 
- 		if (!gd->callback_done) {
- 			gd->callback_done = TRUE;
- 			gd->sec.qop = qop;
- 			(void)rpc_gss_num_to_qop(gd->rcred.mechanism,
- 						gd->sec.qop, &gd->rcred.qop);
--			if (!svcauth_gss_callback(rqst, gd))
--				return (AUTH_REJECTEDCRED);
-+			if (!svcauth_gss_callback(rqst, gd)) {
-+				result = AUTH_REJECTEDCRED;
-+				break;
-+			}
- 		}
- 
- 		if (gd->locked) {
- 			if (gd->rcred.service !=
--					_rpc_gss_svc_to_service(gc->gc_svc))
--				return (AUTH_FAILED);
--			if (gd->sec.qop != qop)
--				return (AUTH_BADVERF);
-+					_rpc_gss_svc_to_service(gc->gc_svc)) {
-+				result = AUTH_FAILED;
-+				break;
-+			}
-+			if (gd->sec.qop != qop) {
-+				result = AUTH_BADVERF;
-+				break;
-+			}
- 		}
- 
- 		if (gd->sec.qop != qop) {
-@@ -724,17 +770,25 @@ _svcauth_gss(struct svc_req *rqst, struct rpc_msg *msg, bool_t *no_dispatch)
- 		break;
- 
- 	case RPCSEC_GSS_DESTROY:
--		if (rqst->rq_proc != NULLPROC)
--			return (AUTH_FAILED);		/* XXX ? */
-+		if (rqst->rq_proc != NULLPROC) {
-+			result = AUTH_FAILED;		/* XXX ? */
-+			break;
-+		}
- 
--		if (!svcauth_gss_validate(gd, msg, &qop))
--			return (RPCSEC_GSS_CREDPROBLEM);
-+		if (!svcauth_gss_validate(gd, msg, &qop)) {
-+			result = RPCSEC_GSS_CREDPROBLEM;
-+			break;
-+		}
- 
--		if (!svcauth_gss_nextverf(rqst, htonl(gc->gc_seq)))
--			return (AUTH_FAILED);
-+		if (!svcauth_gss_nextverf(rqst, htonl(gc->gc_seq))) {
-+			result = AUTH_FAILED;
-+			break;
-+		}
- 
--		if (!svcauth_gss_release_cred())
--			return (AUTH_FAILED);
-+		if (!svcauth_gss_release_cred()) {
-+			result = AUTH_FAILED;
-+			break;
-+		}
- 
- 		SVCAUTH_DESTROY(&SVC_XP_AUTH(rqst->rq_xprt));
- 		SVC_XP_AUTH(rqst->rq_xprt).svc_ah_ops = svc_auth_none.svc_ah_ops;
-@@ -743,10 +797,12 @@ _svcauth_gss(struct svc_req *rqst, struct rpc_msg *msg, bool_t *no_dispatch)
- 		break;
- 
- 	default:
--		return (AUTH_REJECTEDCRED);
-+		result = AUTH_REJECTEDCRED;
- 		break;
- 	}
--	return (AUTH_OK);
-+out:
-+	xdr_free((xdrproc_t)xdr_rpc_gss_cred, (caddr_t)gc);
-+	return result;
- }
- 
- static bool_t
-@@ -890,7 +946,6 @@ bool_t
- rpc_gss_set_svc_name(char *principal, char *mechanism, u_int req_time,
- 		u_int UNUSED(program), u_int UNUSED(version))
- {
--	gss_OID_set_desc oid_set;
- 	rpc_gss_OID oid;
- 	char *save;
- 
-@@ -902,14 +957,13 @@ rpc_gss_set_svc_name(char *principal, char *mechanism, u_int req_time,
- 
- 	if (!rpc_gss_mech_to_oid(mechanism, &oid))
- 		goto out_err;
--	oid_set.count = 1;
--	oid_set.elements = (gss_OID)oid;
- 
- 	if (!svcauth_gss_import_name(principal))
- 		goto out_err;
--	if (!svcauth_gss_acquire_cred(req_time, &oid_set))
--		goto out_err;
- 
-+	_svcauth_req_time = req_time;
-+	_svcauth_oid_set.count = 1;
-+	_svcauth_oid_set.elements = (gss_OID)oid;
- 	free(_svcauth_svc_name);
- 	_svcauth_svc_name = save;
- 	return TRUE;
-diff --git a/src/svc_vc.c b/src/svc_vc.c
-index 6ae613d..97a76a3 100644
---- a/src/svc_vc.c
-+++ b/src/svc_vc.c
-@@ -270,14 +270,8 @@ makefd_xprt(fd, sendsize, recvsize)
- 	struct cf_conn *cd;
- 	const char *netid;
- 	struct __rpc_sockinfo si;
-- 
--	assert(fd != -1);
- 
--        if (fd >= FD_SETSIZE) {
--                warnx("svc_vc: makefd_xprt: fd too high\n");
--                xprt = NULL;
--                goto done;
--        }
-+	assert(fd != -1);
- 
- 	xprt = mem_alloc(sizeof(SVCXPRT));
- 	if (xprt == NULL) {
-@@ -338,22 +332,10 @@ rendezvous_request(xprt, msg)
- 	r = (struct cf_rendezvous *)xprt->xp_p1;
- again:
- 	len = sizeof addr;
--	if ((sock = accept(xprt->xp_fd, (struct sockaddr *)(void *)&addr,
--	    &len)) < 0) {
-+	sock = accept(xprt->xp_fd, (struct sockaddr *)(void *)&addr, &len);
-+	if (sock < 0) {
- 		if (errno == EINTR)
- 			goto again;
--
--		if (errno == EMFILE || errno == ENFILE) {
--		  /* If there are no file descriptors available, then accept will fail.
--		     We want to delay here so the connection request can be dequeued;
--		     otherwise we can bounce between polling and accepting, never
--		     giving the request a chance to dequeue and eating an enormous
--		     amount of cpu time in svc_run if we're polling on many file
--		     descriptors.  */
--		        struct timespec ts = { .tv_sec = 0, .tv_nsec = 50000000 };
--                        nanosleep (&ts, NULL);
--			goto again;
--		}
- 		return (FALSE);
- 	}
- 	/*
-diff --git a/tirpc/rpc/des.h b/tirpc/rpc/des.h
-index d2881ad..018aa48 100644
---- a/tirpc/rpc/des.h
-+++ b/tirpc/rpc/des.h
-@@ -82,6 +82,6 @@ struct desparams {
- /*
-  * Software DES.
-  */
--extern int _des_crypt( char *, int, struct desparams * );
-+extern int _des_crypt( char *, unsigned, struct desparams * );
- 
- #endif
-diff --git a/tirpc/rpc/rpcent.h b/tirpc/rpc/rpcent.h
-index 147f909..e07503c 100644
---- a/tirpc/rpc/rpcent.h
-+++ b/tirpc/rpc/rpcent.h
-@@ -60,10 +60,11 @@ struct rpcent {
- extern struct rpcent *getrpcbyname(const char *);
- extern struct rpcent *getrpcbynumber(int);
- extern struct rpcent *getrpcent(void);
--#endif
- 
- extern void setrpcent(int);
- extern void endrpcent(void);
-+#endif
-+
- #ifdef __cplusplus
- }
- #endif

diff --git a/net-libs/libtirpc/files/libtirpc-0.2.5-stdarg.patch b/net-libs/libtirpc/files/libtirpc-0.2.5-stdarg.patch
deleted file mode 100644
index 8006de3..0000000
--- a/net-libs/libtirpc/files/libtirpc-0.2.5-stdarg.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From d26607bade0893fe8652e1a0983f9fae59c64649 Mon Sep 17 00:00:00 2001
-From: Mike Frysinger <vapier@gentoo.org>
-Date: Tue, 12 Aug 2014 03:11:41 -0400
-Subject: [PATCH libtirpc] include stdarg.h when used
-
-The debug.h header uses va_list but doesn't include stdarg.h which
-can lead to random build failures.
-
-Signed-off-by: Mike Frysinger <vapier@gentoo.org>
----
- src/debug.h | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/src/debug.h b/src/debug.h
-index afc8d57..c971ac3 100644
---- a/src/debug.h
-+++ b/src/debug.h
-@@ -21,6 +21,8 @@
- 
- #ifndef _DEBUG_H
- #define _DEBUG_H
-+
-+#include <stdarg.h>
- #include <syslog.h>
- 
- extern int libtirpc_debug_level;
--- 
-2.0.0
-

diff --git a/net-libs/libtirpc/files/libtirpc-1.0.1-CVE-2017-8779.patch b/net-libs/libtirpc/files/libtirpc-1.0.1-CVE-2017-8779.patch
deleted file mode 100644
index 91a50fa..0000000
--- a/net-libs/libtirpc/files/libtirpc-1.0.1-CVE-2017-8779.patch
+++ /dev/null
@@ -1,255 +0,0 @@
-diff --git a/src/rpc_generic.c b/src/rpc_generic.c
-index 2f09a8f..589cbd5 100644
---- a/src/rpc_generic.c
-+++ b/src/rpc_generic.c
-@@ -615,6 +615,9 @@ __rpc_taddr2uaddr_af(int af, const struct netbuf *nbuf)
- 
- 	switch (af) {
- 	case AF_INET:
-+		if (nbuf->len < sizeof(*sin)) {
-+			return NULL;
-+		}
- 		sin = nbuf->buf;
- 		if (inet_ntop(af, &sin->sin_addr, namebuf, sizeof namebuf)
- 		    == NULL)
-@@ -626,6 +629,9 @@ __rpc_taddr2uaddr_af(int af, const struct netbuf *nbuf)
- 		break;
- #ifdef INET6
- 	case AF_INET6:
-+		if (nbuf->len < sizeof(*sin6)) {
-+			return NULL;
-+		}
- 		sin6 = nbuf->buf;
- 		if (inet_ntop(af, &sin6->sin6_addr, namebuf6, sizeof namebuf6)
- 		    == NULL)
-@@ -667,6 +673,8 @@ __rpc_uaddr2taddr_af(int af, const char *uaddr)
- 
- 	port = 0;
- 	sin = NULL;
-+	if (uaddr == NULL)
-+		return NULL;
- 	addrstr = strdup(uaddr);
- 	if (addrstr == NULL)
- 		return NULL;
-diff --git a/src/rpcb_prot.c b/src/rpcb_prot.c
-index 43fd385..a923c8e 100644
---- a/src/rpcb_prot.c
-+++ b/src/rpcb_prot.c
-@@ -41,6 +41,7 @@
- #include <rpc/types.h>
- #include <rpc/xdr.h>
- #include <rpc/rpcb_prot.h>
-+#include "rpc_com.h"
- 
- bool_t
- xdr_rpcb(xdrs, objp)
-@@ -53,13 +54,13 @@ xdr_rpcb(xdrs, objp)
- 	if (!xdr_u_int32_t(xdrs, &objp->r_vers)) {
- 		return (FALSE);
- 	}
--	if (!xdr_string(xdrs, &objp->r_netid, (u_int)~0)) {
-+	if (!xdr_string(xdrs, &objp->r_netid, RPC_MAXDATASIZE)) {
- 		return (FALSE);
- 	}
--	if (!xdr_string(xdrs, &objp->r_addr, (u_int)~0)) {
-+	if (!xdr_string(xdrs, &objp->r_addr, RPC_MAXDATASIZE)) {
- 		return (FALSE);
- 	}
--	if (!xdr_string(xdrs, &objp->r_owner, (u_int)~0)) {
-+	if (!xdr_string(xdrs, &objp->r_owner, RPC_MAXDATASIZE)) {
- 		return (FALSE);
- 	}
- 	return (TRUE);
-@@ -159,19 +160,19 @@ xdr_rpcb_entry(xdrs, objp)
- 	XDR *xdrs;
- 	rpcb_entry *objp;
- {
--	if (!xdr_string(xdrs, &objp->r_maddr, (u_int)~0)) {
-+	if (!xdr_string(xdrs, &objp->r_maddr, RPC_MAXDATASIZE)) {
- 		return (FALSE);
- 	}
--	if (!xdr_string(xdrs, &objp->r_nc_netid, (u_int)~0)) {
-+	if (!xdr_string(xdrs, &objp->r_nc_netid, RPC_MAXDATASIZE)) {
- 		return (FALSE);
- 	}
- 	if (!xdr_u_int32_t(xdrs, &objp->r_nc_semantics)) {
- 		return (FALSE);
- 	}
--	if (!xdr_string(xdrs, &objp->r_nc_protofmly, (u_int)~0)) {
-+	if (!xdr_string(xdrs, &objp->r_nc_protofmly, RPC_MAXDATASIZE)) {
- 		return (FALSE);
- 	}
--	if (!xdr_string(xdrs, &objp->r_nc_proto, (u_int)~0)) {
-+	if (!xdr_string(xdrs, &objp->r_nc_proto, RPC_MAXDATASIZE)) {
- 		return (FALSE);
- 	}
- 	return (TRUE);
-@@ -292,7 +293,7 @@ xdr_rpcb_rmtcallres(xdrs, p)
- 	bool_t dummy;
- 	struct r_rpcb_rmtcallres *objp = (struct r_rpcb_rmtcallres *)(void *)p;
- 
--	if (!xdr_string(xdrs, &objp->addr, (u_int)~0)) {
-+	if (!xdr_string(xdrs, &objp->addr, RPC_MAXDATASIZE)) {
- 		return (FALSE);
- 	}
- 	if (!xdr_u_int(xdrs, &objp->results.results_len)) {
-@@ -312,6 +313,11 @@ xdr_netbuf(xdrs, objp)
- 	if (!xdr_u_int32_t(xdrs, (u_int32_t *) &objp->maxlen)) {
- 		return (FALSE);
- 	}
-+
-+	if (objp->maxlen > RPC_MAXDATASIZE) {
-+		return (FALSE);
-+	}
-+
- 	dummy = xdr_bytes(xdrs, (char **)&(objp->buf),
- 			(u_int *)&(objp->len), objp->maxlen);
- 	return (dummy);
-diff --git a/src/rpcb_st_xdr.c b/src/rpcb_st_xdr.c
-index 08db745..28e6a48 100644
---- a/src/rpcb_st_xdr.c
-+++ b/src/rpcb_st_xdr.c
-@@ -37,6 +37,7 @@
- 
- 
- #include <rpc/rpc.h>
-+#include "rpc_com.h"
- 
- /* Link list of all the stats about getport and getaddr */
- 
-@@ -58,7 +59,7 @@ xdr_rpcbs_addrlist(xdrs, objp)
- 	    if (!xdr_int(xdrs, &objp->failure)) {
- 		return (FALSE);
- 	    }
--	    if (!xdr_string(xdrs, &objp->netid, (u_int)~0)) {
-+	    if (!xdr_string(xdrs, &objp->netid, RPC_MAXDATASIZE)) {
- 		return (FALSE);
- 	    }
- 
-@@ -109,7 +110,7 @@ xdr_rpcbs_rmtcalllist(xdrs, objp)
- 		IXDR_PUT_INT32(buf, objp->failure);
- 		IXDR_PUT_INT32(buf, objp->indirect);
- 	}
--	if (!xdr_string(xdrs, &objp->netid, (u_int)~0)) {
-+	if (!xdr_string(xdrs, &objp->netid, RPC_MAXDATASIZE)) {
- 		return (FALSE);
- 	}
- 	if (!xdr_pointer(xdrs, (char **)&objp->next,
-@@ -147,7 +148,7 @@ xdr_rpcbs_rmtcalllist(xdrs, objp)
- 		objp->failure = (int)IXDR_GET_INT32(buf);
- 		objp->indirect = (int)IXDR_GET_INT32(buf);
- 	}
--	if (!xdr_string(xdrs, &objp->netid, (u_int)~0)) {
-+	if (!xdr_string(xdrs, &objp->netid, RPC_MAXDATASIZE)) {
- 		return (FALSE);
- 	}
- 	if (!xdr_pointer(xdrs, (char **)&objp->next,
-@@ -175,7 +176,7 @@ xdr_rpcbs_rmtcalllist(xdrs, objp)
- 	if (!xdr_int(xdrs, &objp->indirect)) {
- 		return (FALSE);
- 	}
--	if (!xdr_string(xdrs, &objp->netid, (u_int)~0)) {
-+	if (!xdr_string(xdrs, &objp->netid, RPC_MAXDATASIZE)) {
- 		return (FALSE);
- 	}
- 	if (!xdr_pointer(xdrs, (char **)&objp->next,
-diff --git a/src/xdr.c b/src/xdr.c
-index f3fb9ad..b9a1558 100644
---- a/src/xdr.c
-+++ b/src/xdr.c
-@@ -42,8 +42,10 @@
- #include <stdlib.h>
- #include <string.h>
- 
-+#include <rpc/rpc.h>
- #include <rpc/types.h>
- #include <rpc/xdr.h>
-+#include <rpc/rpc_com.h>
- 
- typedef quad_t          longlong_t;     /* ANSI long long type */
- typedef u_quad_t        u_longlong_t;   /* ANSI unsigned long long type */
-@@ -53,7 +55,6 @@ typedef u_quad_t        u_longlong_t;   /* ANSI unsigned long long type */
-  */
- #define XDR_FALSE	((long) 0)
- #define XDR_TRUE	((long) 1)
--#define LASTUNSIGNED	((u_int) 0-1)
- 
- /*
-  * for unit alignment
-@@ -629,6 +630,7 @@ xdr_bytes(xdrs, cpp, sizep, maxsize)
- {
- 	char *sp = *cpp;  /* sp is the actual string pointer */
- 	u_int nodesize;
-+	bool_t ret, allocated = FALSE;
- 
- 	/*
- 	 * first deal with the length since xdr bytes are counted
-@@ -652,6 +654,7 @@ xdr_bytes(xdrs, cpp, sizep, maxsize)
- 		}
- 		if (sp == NULL) {
- 			*cpp = sp = mem_alloc(nodesize);
-+			allocated = TRUE;
- 		}
- 		if (sp == NULL) {
- 			warnx("xdr_bytes: out of memory");
-@@ -660,7 +663,14 @@ xdr_bytes(xdrs, cpp, sizep, maxsize)
- 		/* FALLTHROUGH */
- 
- 	case XDR_ENCODE:
--		return (xdr_opaque(xdrs, sp, nodesize));
-+		ret = xdr_opaque(xdrs, sp, nodesize);
-+		if ((xdrs->x_op == XDR_DECODE) && (ret == FALSE)) {
-+			if (allocated == TRUE) {
-+				free(sp);
-+				*cpp = NULL;
-+			}
-+		}
-+		return (ret);
- 
- 	case XDR_FREE:
- 		if (sp != NULL) {
-@@ -754,6 +764,7 @@ xdr_string(xdrs, cpp, maxsize)
- 	char *sp = *cpp;  /* sp is the actual string pointer */
- 	u_int size;
- 	u_int nodesize;
-+	bool_t ret, allocated = FALSE;
- 
- 	/*
- 	 * first deal with the length since xdr strings are counted-strings
-@@ -793,8 +804,10 @@ xdr_string(xdrs, cpp, maxsize)
- 	switch (xdrs->x_op) {
- 
- 	case XDR_DECODE:
--		if (sp == NULL)
-+		if (sp == NULL) {
- 			*cpp = sp = mem_alloc(nodesize);
-+			allocated = TRUE;
-+		}
- 		if (sp == NULL) {
- 			warnx("xdr_string: out of memory");
- 			return (FALSE);
-@@ -803,7 +816,14 @@ xdr_string(xdrs, cpp, maxsize)
- 		/* FALLTHROUGH */
- 
- 	case XDR_ENCODE:
--		return (xdr_opaque(xdrs, sp, size));
-+		ret = xdr_opaque(xdrs, sp, size);
-+		if ((xdrs->x_op == XDR_DECODE) && (ret == FALSE)) {
-+			if (allocated == TRUE) {
-+				free(sp);
-+				*cpp = NULL;
-+			}
-+		}
-+		return (ret);
- 
- 	case XDR_FREE:
- 		mem_free(sp, nodesize);
-@@ -823,7 +843,7 @@ xdr_wrapstring(xdrs, cpp)
- 	XDR *xdrs;
- 	char **cpp;
- {
--	return xdr_string(xdrs, cpp, LASTUNSIGNED);
-+	return xdr_string(xdrs, cpp, RPC_MAXDATASIZE);
- }
- 
- /*

diff --git a/net-libs/libtirpc/files/libtirpc-1.0.2-bcopy-to-memmove.patch b/net-libs/libtirpc/files/libtirpc-1.0.2-bcopy-to-memmove.patch
new file mode 100644
index 0000000..91619b7
--- /dev/null
+++ b/net-libs/libtirpc/files/libtirpc-1.0.2-bcopy-to-memmove.patch
@@ -0,0 +1,49 @@
+diff -Naurp libtirpc-1.0.2.orig/src/auth_time.c libtirpc-1.0.2/src/auth_time.c
+--- libtirpc-1.0.2.orig/src/auth_time.c	2017-07-05 11:02:23.000000000 -0400
++++ libtirpc-1.0.2/src/auth_time.c	2017-07-30 17:48:31.361420071 -0400
+@@ -104,7 +104,7 @@ static int uaddr_to_sockaddr(uaddr, sin)
+ 	p_bytes[1] = (unsigned char)a[5] & 0x000000FF;
+ 
+ 	sin->sin_family = AF_INET; /* always */
+-	bcopy((char *)&p_bytes, (char *)&sin->sin_port, 2);
++	memmove((char *)&sin->sin_port, (char *)&p_bytes, 2);
+ 
+ 	return (0);
+ }
+diff -Naurp libtirpc-1.0.2.orig/src/crypt_client.c libtirpc-1.0.2/src/crypt_client.c
+--- libtirpc-1.0.2.orig/src/crypt_client.c	2017-07-05 11:02:23.000000000 -0400
++++ libtirpc-1.0.2/src/crypt_client.c	2017-07-30 17:49:57.911419445 -0400
+@@ -75,8 +75,8 @@ _des_crypt_call(buf, len, dparms)
+ 	des_crypt_1_arg.desbuf.desbuf_val = buf;
+ 	des_crypt_1_arg.des_dir = dparms->des_dir;
+ 	des_crypt_1_arg.des_mode = dparms->des_mode;
+-	bcopy(dparms->des_ivec, des_crypt_1_arg.des_ivec, 8);
+-	bcopy(dparms->des_key, des_crypt_1_arg.des_key, 8);
++	memmove(des_crypt_1_arg.des_ivec, dparms->des_ivec, 8);
++	memmove(des_crypt_1_arg.des_key, dparms->des_key, 8);
+ 
+ 	result_1 = des_crypt_1(&des_crypt_1_arg, clnt);
+ 	if (result_1 == (desresp *) NULL) {
+@@ -88,8 +88,8 @@ _des_crypt_call(buf, len, dparms)
+ 
+ 	if (result_1->stat == DESERR_NONE ||
+ 	    result_1->stat == DESERR_NOHWDEVICE) {
+-		bcopy(result_1->desbuf.desbuf_val, buf, len);
+-		bcopy(result_1->des_ivec, dparms->des_ivec, 8);
++		memmove(buf, result_1->desbuf.desbuf_val, len);
++		memmove(dparms->des_ivec, result_1->des_ivec, 8);
+ 	}
+ 
+ 	clnt_freeres(clnt, (xdrproc_t)xdr_desresp, result_1);
+diff -Naurp libtirpc-1.0.2.orig/src/svc_auth_des.c libtirpc-1.0.2/src/svc_auth_des.c
+--- libtirpc-1.0.2.orig/src/svc_auth_des.c	2017-07-05 11:02:23.000000000 -0400
++++ libtirpc-1.0.2/src/svc_auth_des.c	2017-07-30 17:50:36.591419165 -0400
+@@ -145,7 +145,7 @@ _svcauth_des(rqst, msg)
+ 			return (AUTH_BADCRED);
+ 		}
+ 		cred->adc_fullname.name = area->area_netname;
+-		bcopy((char *)ixdr, cred->adc_fullname.name, 
++		memmove(cred->adc_fullname.name, (char *)ixdr,
+ 			(u_int)namelen);
+ 		cred->adc_fullname.name[namelen] = 0;
+ 		ixdr += (RNDUP(namelen) / BYTES_PER_XDR_UNIT);

diff --git a/net-libs/libtirpc/files/libtirpc-1.0.2-bzero-to-memset.patch b/net-libs/libtirpc/files/libtirpc-1.0.2-bzero-to-memset.patch
new file mode 100644
index 0000000..64b516e
--- /dev/null
+++ b/net-libs/libtirpc/files/libtirpc-1.0.2-bzero-to-memset.patch
@@ -0,0 +1,36 @@
+diff -Naurp libtirpc-1.0.2.orig/src/auth_time.c libtirpc-1.0.2/src/auth_time.c
+--- libtirpc-1.0.2.orig/src/auth_time.c	2017-07-05 11:02:23.000000000 -0400
++++ libtirpc-1.0.2/src/auth_time.c	2017-07-30 17:46:39.481420880 -0400
+@@ -317,7 +317,7 @@ __rpc_get_time_offset(td, srv, thost, ua
+ 	sprintf(ipuaddr, "%d.%d.%d.%d.0.111", a1, a2, a3, a4);
+ 	useua = &ipuaddr[0];
+ 
+-	bzero((char *)&sin, sizeof(sin));
++	memset((char *)&sin, 0, sizeof(sin));
+ 	if (uaddr_to_sockaddr(useua, &sin)) {
+ 		msg("unable to translate uaddr to sockaddr.");
+ 		if (needfree)
+diff -Naurp libtirpc-1.0.2.orig/src/des_impl.c libtirpc-1.0.2/src/des_impl.c
+--- libtirpc-1.0.2.orig/src/des_impl.c	2017-07-05 11:02:23.000000000 -0400
++++ libtirpc-1.0.2/src/des_impl.c	2017-07-30 17:46:49.581420807 -0400
+@@ -588,7 +588,7 @@ _des_crypt (char *buf, unsigned len, str
+     }
+   tin0 = tin1 = tout0 = tout1 = xor0 = xor1 = 0;
+   tbuf[0] = tbuf[1] = 0;
+-  __bzero (schedule, sizeof (schedule));
++  memset (schedule, 0, sizeof (schedule));
+ 
+   return (1);
+ }
+diff -Naurp libtirpc-1.0.2.orig/src/svc_auth_des.c libtirpc-1.0.2/src/svc_auth_des.c
+--- libtirpc-1.0.2.orig/src/svc_auth_des.c	2017-07-05 11:02:23.000000000 -0400
++++ libtirpc-1.0.2/src/svc_auth_des.c	2017-07-30 17:46:58.771420741 -0400
+@@ -356,7 +356,7 @@ cache_init()
+ 
+ 	authdes_cache = (struct cache_entry *)
+ 		mem_alloc(sizeof(struct cache_entry) * AUTHDES_CACHESZ);	
+-	bzero((char *)authdes_cache, 
++	memset((char *)authdes_cache, 0,
+ 		sizeof(struct cache_entry) * AUTHDES_CACHESZ);
+ 
+ 	authdes_lru = (short *)mem_alloc(sizeof(short) * AUTHDES_CACHESZ);

diff --git a/net-libs/libtirpc/files/libtirpc-1.0.2-exports.patch b/net-libs/libtirpc/files/libtirpc-1.0.2-exports.patch
new file mode 100644
index 0000000..174f4e3
--- /dev/null
+++ b/net-libs/libtirpc/files/libtirpc-1.0.2-exports.patch
@@ -0,0 +1,17 @@
+See
+https://bugs.alpinelinux.org/issues/7041
+https://git.alpinelinux.org/cgit/aports/commit/?id=9edb53cea056101c4963a04b747bf102de23f919
+(just hit this myself when building libnsl)
+... dilfridge
+
+--- a/src/libtirpc.map
++++ b/src/libtirpc.map
+@@ -298,7 +298,7 @@
+     key_gendes;
+     key_get_conv;
+     key_setsecret;
+-    key_secret_is_set;
++    key_secretkey_is_set;
+     key_setnet;
+     netname2host;
+     netname2user;

diff --git a/net-libs/libtirpc/files/libtirpc-1.0.2-glibc-2.26.patch b/net-libs/libtirpc/files/libtirpc-1.0.2-glibc-2.26.patch
new file mode 100644
index 0000000..6d583e6
--- /dev/null
+++ b/net-libs/libtirpc/files/libtirpc-1.0.2-glibc-2.26.patch
@@ -0,0 +1,12 @@
+diff --git a/src/xdr_sizeof.c b/src/xdr_sizeof.c
+index d23fbd1..79d6707 100644
+--- a/src/xdr_sizeof.c
++++ b/src/xdr_sizeof.c
+@@ -39,6 +39,7 @@
+ #include <rpc/xdr.h>
+ #include <sys/types.h>
+ #include <stdlib.h>
++#include <stdint.h>
+ #include "un-namespace.h"
+ 
+ /* ARGSUSED */

diff --git a/net-libs/libtirpc/libtirpc-0.2.5.ebuild b/net-libs/libtirpc/libtirpc-0.2.5.ebuild
deleted file mode 100644
index fa28963..0000000
--- a/net-libs/libtirpc/libtirpc-0.2.5.ebuild
+++ /dev/null
@@ -1,73 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="4"
-
-inherit multilib-minimal toolchain-funcs autotools
-
-DESCRIPTION="Transport Independent RPC library (SunRPC replacement)"
-HOMEPAGE="http://libtirpc.sourceforge.net/"
-SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2
-	mirror://gentoo/${PN}-glibc-nfs.tar.xz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~mips ppc ppc64 s390 sh sparc x86"
-IUSE="ipv6 kerberos static-libs"
-
-RDEPEND="kerberos? ( >=virtual/krb5-0-r1[${MULTILIB_USEDEP}] )"
-DEPEND="${RDEPEND}
-	elibc_musl? ( sys-libs/queue )
-	app-arch/xz-utils
-	>=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}]"
-RDEPEND="${RDEPEND}
-	abi_x86_32? (
-		!<=app-emulation/emul-linux-x86-baselibs-20140508-r7
-		!app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
-	)"
-
-src_unpack() {
-	unpack ${A}
-	cp -r tirpc "${S}"/ || die
-}
-
-src_prepare() {
-	epatch "${FILESDIR}"/${P}-stdarg.patch
-	epatch "${FILESDIR}"/0001-Provide-getrpcbynumber-and-getrpcbyname-if-those-are.patch
-	epatch "${FILESDIR}"/0002-Misc-header-fixes.patch
-	epatch "${FILESDIR}"/0003-fix_cdefs_h_include.patch
-	epatch "${FILESDIR}"/0004-fix_DECLS.patch
-	epatch "${FILESDIR}"/0005-fix_remaining_issues.patch
-	epatch "${FILESDIR}"/0007-no-des.patch
-	eautoconf
-	eautoreconf
-}
-
-multilib_src_configure() {
-	ECONF_SOURCE=${S} \
-	econf \
-		$(use_enable ipv6) \
-		$(use_enable kerberos gssapi) \
-		$(use_enable static-libs static)
-}
-
-multilib_src_install() {
-	default
-
-	# libtirpc replaces rpc support in glibc, so we need it in /
-	gen_usr_ldscript -a tirpc
-}
-
-multilib_src_install_all() {
-	einstalldocs
-
-	insinto /etc
-	doins doc/netconfig
-
-	insinto /usr/include/tirpc
-	doins -r "${WORKDIR}"/tirpc/*
-
-	# makes sure that the linking order for nfs-utils is proper, as
-	# libtool would inject a libgssglue dependency in the list.
-	use static-libs || prune_libtool_files
-}

diff --git a/net-libs/libtirpc/libtirpc-1.0.1-r1.ebuild b/net-libs/libtirpc/libtirpc-1.0.2-r1.ebuild
similarity index 81%
rename from net-libs/libtirpc/libtirpc-1.0.1-r1.ebuild
rename to net-libs/libtirpc/libtirpc-1.0.2-r1.ebuild
index dea23ff..cb5ecc2 100644
--- a/net-libs/libtirpc/libtirpc-1.0.1-r1.ebuild
+++ b/net-libs/libtirpc/libtirpc-1.0.2-r1.ebuild
@@ -3,7 +3,7 @@
 
 EAPI="5"
 
-inherit multilib-minimal toolchain-funcs eutils
+inherit autotools multilib-minimal toolchain-funcs eutils
 
 DESCRIPTION="Transport Independent RPC library (SunRPC replacement)"
 HOMEPAGE="http://libtirpc.sourceforge.net/"
@@ -12,7 +12,7 @@ SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2
 
 LICENSE="GPL-2"
 SLOT="0/3" # subslot matches SONAME major
-KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86"
+KEYWORDS="amd64 arm ~mips ppc x86"
 IUSE="ipv6 kerberos static-libs"
 
 RDEPEND="kerberos? ( >=virtual/krb5-0-r1[${MULTILIB_USEDEP}] )"
@@ -22,15 +22,17 @@ DEPEND="${RDEPEND}
 	>=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}]"
 
 PATCHES=(
-	"${FILESDIR}/${P}-CVE-2017-8779.patch"
-	# musl fixes
-	"${FILESDIR}"/git.patch
+	"${FILESDIR}/${PN}-1.0.2-bcopy-to-memmove.patch"
+	"${FILESDIR}/${PN}-1.0.2-bzero-to-memset.patch"
+	"${FILESDIR}/${PN}-1.0.2-glibc-2.26.patch"
+	"${FILESDIR}/${PN}-1.0.2-exports.patch"
 )
 
 src_prepare() {
 	cp -r "${WORKDIR}"/tirpc "${S}"/ || die
 	epatch "${PATCHES[@]}"
 	epatch_user
+	eautoreconf
 }
 
 multilib_src_configure() {


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] proj/musl:master commit in: net-libs/libtirpc/, net-libs/libtirpc/files/
@ 2019-07-10  5:53 Jory Pratt
  0 siblings, 0 replies; 6+ messages in thread
From: Jory Pratt @ 2019-07-10  5:53 UTC (permalink / raw
  To: gentoo-commits

commit:     19d4870f87c1caa7799984cb7cdf4db92cb1e581
Author:     Jory Pratt <anarchy <AT> gentoo <DOT> org>
AuthorDate: Wed Jul 10 05:53:39 2019 +0000
Commit:     Jory Pratt <anarchy <AT> gentoo <DOT> org>
CommitDate: Wed Jul 10 05:53:39 2019 +0000
URL:        https://gitweb.gentoo.org/proj/musl.git/commit/?id=19d4870f

net-libs/libtirpc: apply the minimilistic patch required to function

Package-Manager: Portage-2.3.68, Repoman-2.3.16
Signed-off-by: Jory Pratt <anarchy <AT> gentoo.org>

 .../libtirpc/files/libtirpc-1.1.4-musl_types.patch | 29 ++++++++++++++++++++++
 ...tirpc-1.1.4.ebuild => libtirpc-1.1.4-r1.ebuild} |  1 -
 2 files changed, 29 insertions(+), 1 deletion(-)

diff --git a/net-libs/libtirpc/files/libtirpc-1.1.4-musl_types.patch b/net-libs/libtirpc/files/libtirpc-1.1.4-musl_types.patch
new file mode 100644
index 0000000..cca35da
--- /dev/null
+++ b/net-libs/libtirpc/files/libtirpc-1.1.4-musl_types.patch
@@ -0,0 +1,29 @@
+From 45eb8f19128d061936237bf7f827671310161b82 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 10 Jul 2019 00:39:09 -0500
+Subject: [PATCH 2/2] Consider musl provided built-in defines
+
+Helps compile libtirpc with musl
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Signed-off-by: Jory Pratt <anarchy@gentoo.org>
+---
+ tirpc/rpc/types.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tirpc/rpc/types.h b/tirpc/rpc/types.h
+index f069efa..36299df 100644
+--- a/tirpc/rpc/types.h
++++ b/tirpc/rpc/types.h
+@@ -66,7 +66,7 @@ typedef   int32_t rpc_inline_t;
+ #define mem_free(ptr, bsize)	free(ptr)
+ 
+ 
+-#if defined __APPLE_CC__ || defined __FreeBSD__
++#if defined __APPLE_CC__ || defined __FreeBSD__ || !defined(__GLIBC__)
+ # define __u_char_defined
+ # define __daddr_t_defined
+ #endif
+-- 
+2.22.0
+

diff --git a/net-libs/libtirpc/libtirpc-1.1.4.ebuild b/net-libs/libtirpc/libtirpc-1.1.4-r1.ebuild
similarity index 96%
rename from net-libs/libtirpc/libtirpc-1.1.4.ebuild
rename to net-libs/libtirpc/libtirpc-1.1.4-r1.ebuild
index 19d4be2..dec5d9b 100644
--- a/net-libs/libtirpc/libtirpc-1.1.4.ebuild
+++ b/net-libs/libtirpc/libtirpc-1.1.4-r1.ebuild
@@ -22,7 +22,6 @@ DEPEND="${RDEPEND}
 	>=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}]"
 
 PATCHES=(
-	"${FILESDIR}/${PN}-1.0.2-bcopy-to-memmove.patch"
 	"${FILESDIR}/${PN}-1.0.3-musl_types.patch"
 )
 


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] proj/musl:master commit in: net-libs/libtirpc/, net-libs/libtirpc/files/
@ 2020-03-16 16:19 Jory Pratt
  0 siblings, 0 replies; 6+ messages in thread
From: Jory Pratt @ 2020-03-16 16:19 UTC (permalink / raw
  To: gentoo-commits

commit:     d235123608aed83f79535e41849a36eea2201415
Author:     Jory Pratt <anarchy <AT> gentoo <DOT> org>
AuthorDate: Mon Mar 16 16:19:04 2020 +0000
Commit:     Jory Pratt <anarchy <AT> gentoo <DOT> org>
CommitDate: Mon Mar 16 16:19:04 2020 +0000
URL:        https://gitweb.gentoo.org/proj/musl.git/commit/?id=d2351236

net-libs/libtirpc: musl support has been added to ::gentoo

Signed-off-by: Jory Pratt <anarchy <AT> gentoo.org>

 net-libs/libtirpc/Manifest                         |  4 --
 .../files/libtirpc-1.0.2-bcopy-to-memmove.patch    | 49 ----------------
 .../libtirpc/files/libtirpc-1.0.3-musl_types.patch | 12 ----
 .../libtirpc/files/libtirpc-1.1.4-musl_types.patch | 29 ----------
 .../libtirpc-1.2.5-avoid-multiple-definition.patch | 44 ---------------
 net-libs/libtirpc/libtirpc-1.0.3.ebuild            | 65 ----------------------
 net-libs/libtirpc/libtirpc-1.1.4-r1.ebuild         | 64 ---------------------
 net-libs/libtirpc/libtirpc-1.2.5.ebuild            | 64 ---------------------
 net-libs/libtirpc/metadata.xml                     | 11 ----
 9 files changed, 342 deletions(-)

diff --git a/net-libs/libtirpc/Manifest b/net-libs/libtirpc/Manifest
deleted file mode 100644
index 3d4f7dc..0000000
--- a/net-libs/libtirpc/Manifest
+++ /dev/null
@@ -1,4 +0,0 @@
-DIST libtirpc-1.0.3.tar.bz2 509831 BLAKE2B 3f908471b3e10f88329793db2c832754b9bb838d115235d7c25256da883960de8d8c94a6941fc9c2a3cc4dca9a77c32b5cb85bb347cc182e5a6255636b79b06e SHA512 1f1cf7dd6f30ddddc919e4caf6db926f1d532f78d5a93e8aaa2acde6b046be0650c4c46549da0ffd5fa7fb9e550af1a871ed6e02ededf504c6667d2e82eba2cc
-DIST libtirpc-1.1.4.tar.bz2 510924 BLAKE2B 1780f9bb0543583c01b60bda681add0ec2f8718eda4ce4653883c772466178e37d0a3fb47004109f81de470129458561fac4f109f45154c64b6fb729f0212c90 SHA512 392f391f9fc1bd68d81dc44e4058831a64b32790b5c8c37338b0ab416fad2ae4d16389e632596734dba09780347918cc65c6f134e0c1afd09e81ec250785ed23
-DIST libtirpc-1.2.5.tar.bz2 513146 BLAKE2B 732e4832f3440d9fa08c45c01c56135ff1b96564c55d33e9b3f16c8361a4f02e49a35638b73110bb72da4bfb78107ccb1b4d475d1ecbdd62dcc156529a372c3e SHA512 d31cd4e22301abe1baddd7e8f45aaaf056a40799e961646691d071084fed50563b5eecdd9b78062fe378be8db7a6d4b87597e21cb81ac925e447148684a2b002
-DIST libtirpc-glibc-nfs.tar.xz 8948 BLAKE2B 7316623d9f2b6928e296137fe2bf6794b208d549c2ffba9e4a35b47f7b04bf023798a09f38c02d039debf6adc466d7689cf3c8274d71a22eaff08729642c0a28 SHA512 90255bf0a27af16164e0710dd940778609925d473f4343093ff19d98cc4f23023788bf4edf0178eae1961afc0ba8b69b273de95b7d7e2afdb706701d8ba6f7ba

diff --git a/net-libs/libtirpc/files/libtirpc-1.0.2-bcopy-to-memmove.patch b/net-libs/libtirpc/files/libtirpc-1.0.2-bcopy-to-memmove.patch
deleted file mode 100644
index 91619b7..0000000
--- a/net-libs/libtirpc/files/libtirpc-1.0.2-bcopy-to-memmove.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-diff -Naurp libtirpc-1.0.2.orig/src/auth_time.c libtirpc-1.0.2/src/auth_time.c
---- libtirpc-1.0.2.orig/src/auth_time.c	2017-07-05 11:02:23.000000000 -0400
-+++ libtirpc-1.0.2/src/auth_time.c	2017-07-30 17:48:31.361420071 -0400
-@@ -104,7 +104,7 @@ static int uaddr_to_sockaddr(uaddr, sin)
- 	p_bytes[1] = (unsigned char)a[5] & 0x000000FF;
- 
- 	sin->sin_family = AF_INET; /* always */
--	bcopy((char *)&p_bytes, (char *)&sin->sin_port, 2);
-+	memmove((char *)&sin->sin_port, (char *)&p_bytes, 2);
- 
- 	return (0);
- }
-diff -Naurp libtirpc-1.0.2.orig/src/crypt_client.c libtirpc-1.0.2/src/crypt_client.c
---- libtirpc-1.0.2.orig/src/crypt_client.c	2017-07-05 11:02:23.000000000 -0400
-+++ libtirpc-1.0.2/src/crypt_client.c	2017-07-30 17:49:57.911419445 -0400
-@@ -75,8 +75,8 @@ _des_crypt_call(buf, len, dparms)
- 	des_crypt_1_arg.desbuf.desbuf_val = buf;
- 	des_crypt_1_arg.des_dir = dparms->des_dir;
- 	des_crypt_1_arg.des_mode = dparms->des_mode;
--	bcopy(dparms->des_ivec, des_crypt_1_arg.des_ivec, 8);
--	bcopy(dparms->des_key, des_crypt_1_arg.des_key, 8);
-+	memmove(des_crypt_1_arg.des_ivec, dparms->des_ivec, 8);
-+	memmove(des_crypt_1_arg.des_key, dparms->des_key, 8);
- 
- 	result_1 = des_crypt_1(&des_crypt_1_arg, clnt);
- 	if (result_1 == (desresp *) NULL) {
-@@ -88,8 +88,8 @@ _des_crypt_call(buf, len, dparms)
- 
- 	if (result_1->stat == DESERR_NONE ||
- 	    result_1->stat == DESERR_NOHWDEVICE) {
--		bcopy(result_1->desbuf.desbuf_val, buf, len);
--		bcopy(result_1->des_ivec, dparms->des_ivec, 8);
-+		memmove(buf, result_1->desbuf.desbuf_val, len);
-+		memmove(dparms->des_ivec, result_1->des_ivec, 8);
- 	}
- 
- 	clnt_freeres(clnt, (xdrproc_t)xdr_desresp, result_1);
-diff -Naurp libtirpc-1.0.2.orig/src/svc_auth_des.c libtirpc-1.0.2/src/svc_auth_des.c
---- libtirpc-1.0.2.orig/src/svc_auth_des.c	2017-07-05 11:02:23.000000000 -0400
-+++ libtirpc-1.0.2/src/svc_auth_des.c	2017-07-30 17:50:36.591419165 -0400
-@@ -145,7 +145,7 @@ _svcauth_des(rqst, msg)
- 			return (AUTH_BADCRED);
- 		}
- 		cred->adc_fullname.name = area->area_netname;
--		bcopy((char *)ixdr, cred->adc_fullname.name, 
-+		memmove(cred->adc_fullname.name, (char *)ixdr,
- 			(u_int)namelen);
- 		cred->adc_fullname.name[namelen] = 0;
- 		ixdr += (RNDUP(namelen) / BYTES_PER_XDR_UNIT);

diff --git a/net-libs/libtirpc/files/libtirpc-1.0.3-musl_types.patch b/net-libs/libtirpc/files/libtirpc-1.0.3-musl_types.patch
deleted file mode 100644
index 96ad628..0000000
--- a/net-libs/libtirpc/files/libtirpc-1.0.3-musl_types.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -Naur libtirpc-1.0.3.orig/tirpc/rpc/types.h libtirpc-1.0.3/tirpc/rpc/types.h
---- libtirpc-1.0.3.orig/tirpc/rpc/types.h	2018-03-20 09:30:54.610040509 -0700
-+++ libtirpc-1.0.3/tirpc/rpc/types.h	2018-03-20 09:33:43.502037484 -0700
-@@ -66,7 +66,7 @@
- #define mem_free(ptr, bsize)	free(ptr)
- 
- 
--#if defined __APPLE_CC__ || defined __FreeBSD__
-+#if defined __APPLE_CC__ || defined __FreeBSD__ || (defined(__linux__) && !defined(__GLIBC__))
- # define __u_char_defined
- # define __daddr_t_defined
- #endif

diff --git a/net-libs/libtirpc/files/libtirpc-1.1.4-musl_types.patch b/net-libs/libtirpc/files/libtirpc-1.1.4-musl_types.patch
deleted file mode 100644
index cca35da..0000000
--- a/net-libs/libtirpc/files/libtirpc-1.1.4-musl_types.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 45eb8f19128d061936237bf7f827671310161b82 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Wed, 10 Jul 2019 00:39:09 -0500
-Subject: [PATCH 2/2] Consider musl provided built-in defines
-
-Helps compile libtirpc with musl
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Signed-off-by: Jory Pratt <anarchy@gentoo.org>
----
- tirpc/rpc/types.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/tirpc/rpc/types.h b/tirpc/rpc/types.h
-index f069efa..36299df 100644
---- a/tirpc/rpc/types.h
-+++ b/tirpc/rpc/types.h
-@@ -66,7 +66,7 @@ typedef   int32_t rpc_inline_t;
- #define mem_free(ptr, bsize)	free(ptr)
- 
- 
--#if defined __APPLE_CC__ || defined __FreeBSD__
-+#if defined __APPLE_CC__ || defined __FreeBSD__ || !defined(__GLIBC__)
- # define __u_char_defined
- # define __daddr_t_defined
- #endif
--- 
-2.22.0
-

diff --git a/net-libs/libtirpc/files/libtirpc-1.2.5-avoid-multiple-definition.patch b/net-libs/libtirpc/files/libtirpc-1.2.5-avoid-multiple-definition.patch
deleted file mode 100644
index a5fecc5..0000000
--- a/net-libs/libtirpc/files/libtirpc-1.2.5-avoid-multiple-definition.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-From 69682de06816de9b9014441d23bda1918ee2e2fb Mon Sep 17 00:00:00 2001
-From: Mike Gilbert <floppym@gentoo.org>
-Date: Sun, 19 Jan 2020 16:57:45 -0500
-Subject: [PATCH] Avoid multiple-definiton with gcc -fno-common
-
-GCC 10 enables -fno-common by default.
-
-Bug: https://bugs.gentoo.org/705896
----
- src/rpc_com.h | 3 +--
- src/svc.c     | 3 +++
- 2 files changed, 4 insertions(+), 2 deletions(-)
-
-diff --git a/src/rpc_com.h b/src/rpc_com.h
-index 10bec79..76badef 100644
---- a/src/rpc_com.h
-+++ b/src/rpc_com.h
-@@ -61,8 +61,7 @@ void __xprt_unregister_unlocked(SVCXPRT *);
- void __xprt_set_raddr(SVCXPRT *, const struct sockaddr_storage *);
- 
- 
--SVCXPRT **__svc_xports;
--int __svc_maxrec;
-+extern int __svc_maxrec;
- 
- #ifdef __cplusplus
- }
-diff --git a/src/svc.c b/src/svc.c
-index b59467b..6db164b 100644
---- a/src/svc.c
-+++ b/src/svc.c
-@@ -57,6 +57,9 @@
- 
- #define max(a, b) (a > b ? a : b)
- 
-+static SVCXPRT **__svc_xports;
-+int __svc_maxrec;
-+
- /*
-  * The services list
-  * Each entry represents a set of procedures (an rpc program).
--- 
-2.25.0
-

diff --git a/net-libs/libtirpc/libtirpc-1.0.3.ebuild b/net-libs/libtirpc/libtirpc-1.0.3.ebuild
deleted file mode 100644
index 834e95a..0000000
--- a/net-libs/libtirpc/libtirpc-1.0.3.ebuild
+++ /dev/null
@@ -1,65 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-inherit autotools multilib-minimal toolchain-funcs usr-ldscript
-
-DESCRIPTION="Transport Independent RPC library (SunRPC replacement)"
-HOMEPAGE="http://libtirpc.sourceforge.net/"
-SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2
-	mirror://gentoo/${PN}-glibc-nfs.tar.xz"
-
-LICENSE="GPL-2"
-SLOT="0/3" # subslot matches SONAME major
-KEYWORDS="~amd64 ~arm ~arm64 ~mips ~ppc ~ppc64 ~x86"
-IUSE="ipv6 kerberos static-libs"
-
-RDEPEND="kerberos? ( >=virtual/krb5-0-r1[${MULTILIB_USEDEP}] )"
-DEPEND="${RDEPEND}
-	elibc_musl? ( sys-libs/queue-standalone )
-	app-arch/xz-utils
-	>=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}]"
-
-PATCHES=(
-	"${FILESDIR}/${PN}-1.0.2-bcopy-to-memmove.patch"
-	"${FILESDIR}/${PN}-1.0.3-musl_types.patch"
-)
-
-src_prepare() {
-	cp -r "${WORKDIR}"/tirpc "${S}"/ || die
-	default
-	eautoreconf
-}
-
-multilib_src_configure() {
-	local myeconfargs=(
-		$(use_enable ipv6)
-		$(use_enable kerberos gssapi)
-		$(use_enable static-libs static)
-	)
-	ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
-}
-
-multilib_src_install() {
-	default
-
-	# libtirpc replaces rpc support in glibc, so we need it in /
-	gen_usr_ldscript -a tirpc
-}
-
-multilib_src_install_all() {
-	einstalldocs
-
-	insinto /etc
-	doins doc/netconfig
-
-	insinto /usr/include/tirpc
-	doins -r "${WORKDIR}"/tirpc/*
-
-	# makes sure that the linking order for nfs-utils is proper, as
-	# libtool would inject a libgssglue dependency in the list.
-	if ! use static-libs ; then
-		find "${ED}" -name "*.la" -delete || die
-	fi
-}

diff --git a/net-libs/libtirpc/libtirpc-1.1.4-r1.ebuild b/net-libs/libtirpc/libtirpc-1.1.4-r1.ebuild
deleted file mode 100644
index db49cf4..0000000
--- a/net-libs/libtirpc/libtirpc-1.1.4-r1.ebuild
+++ /dev/null
@@ -1,64 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-inherit autotools multilib-minimal toolchain-funcs usr-ldscript
-
-DESCRIPTION="Transport Independent RPC library (SunRPC replacement)"
-HOMEPAGE="http://libtirpc.sourceforge.net/"
-SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2
-	mirror://gentoo/${PN}-glibc-nfs.tar.xz"
-
-LICENSE="GPL-2"
-SLOT="0/3" # subslot matches SONAME major
-KEYWORDS="amd64 arm arm64 ~mips ppc ppc64 x86"
-IUSE="ipv6 kerberos static-libs"
-
-RDEPEND="kerberos? ( >=virtual/krb5-0-r1[${MULTILIB_USEDEP}] )"
-DEPEND="${RDEPEND}
-	elibc_musl? ( sys-libs/queue-standalone )
-	app-arch/xz-utils
-	>=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}]"
-
-PATCHES=(
-	"${FILESDIR}/${PN}-1.0.3-musl_types.patch"
-)
-
-src_prepare() {
-	cp -r "${WORKDIR}"/tirpc "${S}"/ || die
-	default
-	eautoreconf
-}
-
-multilib_src_configure() {
-	local myeconfargs=(
-		$(use_enable ipv6)
-		$(use_enable kerberos gssapi)
-		$(use_enable static-libs static)
-	)
-	ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
-}
-
-multilib_src_install() {
-	default
-
-	# libtirpc replaces rpc support in glibc, so we need it in /
-	gen_usr_ldscript -a tirpc
-}
-
-multilib_src_install_all() {
-	einstalldocs
-
-	insinto /etc
-	doins doc/netconfig
-
-	insinto /usr/include/tirpc
-	doins -r "${WORKDIR}"/tirpc/*
-
-	# makes sure that the linking order for nfs-utils is proper, as
-	# libtool would inject a libgssglue dependency in the list.
-	if ! use static-libs ; then
-		find "${ED}" -name "*.la" -delete || die
-	fi
-}

diff --git a/net-libs/libtirpc/libtirpc-1.2.5.ebuild b/net-libs/libtirpc/libtirpc-1.2.5.ebuild
deleted file mode 100644
index 8cd9355..0000000
--- a/net-libs/libtirpc/libtirpc-1.2.5.ebuild
+++ /dev/null
@@ -1,64 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit autotools multilib-minimal toolchain-funcs usr-ldscript
-
-DESCRIPTION="Transport Independent RPC library (SunRPC replacement)"
-HOMEPAGE="https://sourceforge.net/projects/libtirpc/"
-SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2
-	mirror://gentoo/${PN}-glibc-nfs.tar.xz"
-
-LICENSE="GPL-2"
-SLOT="0/3" # subslot matches SONAME major
-KEYWORDS="amd64 arm arm64 ~mips ppc ppc64 x86"
-IUSE="ipv6 kerberos static-libs"
-
-RDEPEND="kerberos? ( >=virtual/krb5-0-r1[${MULTILIB_USEDEP}] )"
-DEPEND="${RDEPEND}"
-BDEPEND="
-	elibc_musl? ( sys-libs/queue-standalone )
-	app-arch/xz-utils
-	>=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}]"
-
-src_prepare() {
-	cp -r "${WORKDIR}"/tirpc "${S}"/ || die
-	local PATCHES=(
-		"${FILESDIR}"/libtirpc-1.2.5-avoid-multiple-definition.patch
-	)
-	default
-	eautoreconf
-}
-
-multilib_src_configure() {
-	local myeconfargs=(
-		$(use_enable ipv6)
-		$(use_enable kerberos gssapi)
-		$(use_enable static-libs static)
-	)
-	ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
-}
-
-multilib_src_install() {
-	default
-
-	# libtirpc replaces rpc support in glibc, so we need it in /
-	gen_usr_ldscript -a tirpc
-}
-
-multilib_src_install_all() {
-	einstalldocs
-
-	insinto /etc
-	doins doc/netconfig
-
-	insinto /usr/include/tirpc
-	doins -r "${WORKDIR}"/tirpc/*
-
-	# makes sure that the linking order for nfs-utils is proper, as
-	# libtool would inject a libgssglue dependency in the list.
-	if ! use static-libs ; then
-		find "${ED}" -name "*.la" -delete || die
-	fi
-}

diff --git a/net-libs/libtirpc/metadata.xml b/net-libs/libtirpc/metadata.xml
deleted file mode 100644
index 36e84cd..0000000
--- a/net-libs/libtirpc/metadata.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
-	<maintainer type="project">
-		<email>base-system@gentoo.org</email>
-		<name>Gentoo Base System</name>
-	</maintainer>
-	<upstream>
-		<remote-id type="sourceforge">libtirpc</remote-id>
-	</upstream>
-</pkgmetadata>


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-03-16 16:19 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-29 16:47 [gentoo-commits] proj/musl:master commit in: net-libs/libtirpc/, net-libs/libtirpc/files/ Aric Belsito
  -- strict thread matches above, loose matches on Subject: below --
2017-04-03  1:35 Aric Belsito
2017-05-08 21:07 Aric Belsito
2017-12-17 18:04 Anthony G. Basile
2019-07-10  5:53 Jory Pratt
2020-03-16 16:19 Jory Pratt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox