Browse Source

libtirpc: update to 1.0.2, fix glibc/musl compile issues

Waldemar Brodkorb 8 years ago
parent
commit
85dcd86f86

+ 3 - 2
package/libtirpc/Makefile

@@ -4,9 +4,9 @@
 include ${ADK_TOPDIR}/rules.mk
 
 PKG_NAME:=		libtirpc
-PKG_VERSION:=		1.0.1
+PKG_VERSION:=		1.0.2
 PKG_RELEASE:=		1
-PKG_HASH:=		5156974f31be7ccbc8ab1de37c4739af6d9d42c87b1d5caf4835dda75fcbb89e
+PKG_HASH:=		723c5ce92706cbb601a8db09110df1b4b69391643158f20ff587e20e7c5f90f5
 PKG_DESCR:=		transport independent rpc library
 PKG_SECTION:=		libs/net
 PKG_URL:=		http://sourceforge.net/projects/libtirpc/
@@ -25,6 +25,7 @@ include ${ADK_TOPDIR}/mk/package.mk
 
 $(eval $(call PKG_template,LIBTIRPC,libtirpc,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS}))
 
+MAKE_ENV+=		V=1
 AUTOTOOL_STYLE:=	autoreconf
 
 ifeq (${ADK_PACKAGE_LIBTIRPC_WITH_GSS},y)

+ 0 - 33
package/libtirpc/patches/patch-src_Makefile_am

@@ -1,33 +0,0 @@
---- libtirpc-1.0.1.orig/src/Makefile.am	2015-10-30 16:15:14.000000000 +0100
-+++ libtirpc-1.0.1/src/Makefile.am	2015-11-29 16:39:17.803381320 +0100
-@@ -8,7 +8,7 @@
- noinst_HEADERS = rpc_com.h debug.h
- 
- AM_CPPFLAGS = -I$(top_srcdir)/tirpc -include config.h -DPORTMAP -DINET6 \
--		-D_GNU_SOURCE -Wall -pipe
-+		-D_GNU_SOURCE -Wall -pipe -I$(top_builddir)/tirpc
- 
- lib_LTLIBRARIES = libtirpc.la
- 
-@@ -22,9 +22,8 @@ libtirpc_la_SOURCES = auth_none.c auth_u
-         pmap_prot.c pmap_prot2.c pmap_rmt.c rpc_prot.c rpc_commondata.c \
-         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_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
-+        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 xdr_sizeof.c
-@@ -41,8 +40,8 @@ if GSS
-     libtirpc_la_CFLAGS = -DHAVE_RPCSEC_GSS $(GSSAPI_CFLAGS)
- endif
- 
--libtirpc_la_SOURCES += key_call.c key_prot_xdr.c getpublickey.c
--libtirpc_la_SOURCES += netname.c netnamer.c rpcdname.c rtime.c
-+#libtirpc_la_SOURCES += key_call.c key_prot_xdr.c getpublickey.c
-+#libtirpc_la_SOURCES += netname.c netnamer.c rpcdname.c rtime.c
- 
- CLEANFILES	       = cscope.* *~
- DISTCLEANFILES	       = Makefile.in

+ 11 - 0
package/libtirpc/patches/patch-src_des_impl_c

@@ -0,0 +1,11 @@
+--- libtirpc-1.0.2.orig/src/des_impl.c	2017-07-05 17:02:23.000000000 +0200
++++ libtirpc-1.0.2/src/des_impl.c	2017-08-12 20:52:33.863661657 +0200
+@@ -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);
+ }

+ 0 - 97
package/libtirpc/patches/patch-src_rpc_soc_c

@@ -1,97 +0,0 @@
---- libtirpc-1.0.1.orig/src/rpc_soc.c	2015-10-30 16:15:14.000000000 +0100
-+++ libtirpc-1.0.1/src/rpc_soc.c	2015-11-29 16:39:17.831379460 +0100
-@@ -61,7 +61,6 @@
- #include <string.h>
- #include <unistd.h>
- #include <fcntl.h>
--#include <rpcsvc/nis.h>
- 
- #include "rpc_com.h"
- 
-@@ -522,86 +521,6 @@ clnt_broadcast(prog, vers, proc, xargs,
- }
- 
- /*
-- * Create the client des authentication object. Obsoleted by
-- * authdes_seccreate().
-- */
--AUTH *
--authdes_create(servername, window, syncaddr, ckey)
--	char *servername;		/* network name of server */
--	u_int window;			/* time to live */
--	struct sockaddr *syncaddr;	/* optional hostaddr to sync with */
--	des_block *ckey;		/* optional conversation key to use */
--{
--	AUTH *nauth;
--	char hostname[NI_MAXHOST];
--
--	if (syncaddr) {
--		/*
--		 * Change addr to hostname, because that is the way
--		 * new interface takes it.
--		 */
--	        switch (syncaddr->sa_family) {
--		case AF_INET:
--		  if (getnameinfo(syncaddr, sizeof(struct sockaddr_in), hostname,
--				  sizeof hostname, NULL, 0, 0) != 0)
--		    goto fallback;
--		  break;
--		case AF_INET6:
--		  if (getnameinfo(syncaddr, sizeof(struct sockaddr_in6), hostname,
--				  sizeof hostname, NULL, 0, 0) != 0)
--		    goto fallback;
--		  break;
--		default:
--		  goto fallback;
--		}
--		nauth = authdes_seccreate(servername, window, hostname, ckey);
--		return (nauth);
--	}
--fallback:
--	return authdes_seccreate(servername, window, NULL, ckey);
--}
--
--/*
-- * Create the client des authentication object. Obsoleted by
-- * authdes_pk_seccreate().
-- */
--extern AUTH *authdes_pk_seccreate(const char *, netobj *, u_int, const char *,
--        const des_block *, nis_server *);
--
--AUTH *
--authdes_pk_create(servername, pkey, window, syncaddr, ckey)
--	char *servername;		/* network name of server */
--	netobj *pkey;			/* public key */
--	u_int window;			/* time to live */
--	struct sockaddr *syncaddr;	/* optional hostaddr to sync with */
--	des_block *ckey;		/* optional conversation key to use */
--{
--	AUTH *nauth;
--	char hostname[NI_MAXHOST];
--
--	if (syncaddr) {
--		/*
--		 * Change addr to hostname, because that is the way
--		 * new interface takes it.
--		 */
--	        switch (syncaddr->sa_family) {
--		case AF_INET:
--		  if (getnameinfo(syncaddr, sizeof(struct sockaddr_in), hostname,
--				  sizeof hostname, NULL, 0, 0) != 0)
--		    goto fallback;
--		  break;
--		default:
--		  goto fallback;
--		}
--		nauth = authdes_pk_seccreate(servername, pkey, window, hostname, ckey, NULL);
--		return (nauth);
--	}
--fallback:
--	return authdes_pk_seccreate(servername, pkey, window, NULL, ckey, NULL);
--}
--
--
--/*
-  * Create a client handle for a unix connection. Obsoleted by clnt_vc_create()
-  */
- CLIENT *

+ 0 - 36
package/libtirpc/patches/patch-src_svc_c

@@ -1,36 +0,0 @@
---- libtirpc-1.0.1.orig/src/svc.c	2015-10-30 16:15:14.000000000 +0100
-+++ libtirpc-1.0.1/src/svc.c	2015-11-29 16:39:24.994903493 +0100
-@@ -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);
- }
- 

+ 10 - 0
package/libtirpc/patches/patch-src_xdr_sizeof_c

@@ -0,0 +1,10 @@
+--- libtirpc-1.0.2.orig/src/xdr_sizeof.c	2017-07-05 17:02:23.000000000 +0200
++++ libtirpc-1.0.2/src/xdr_sizeof.c	2017-08-12 18:47:36.343232184 +0200
+@@ -39,6 +39,7 @@
+ #include <rpc/xdr.h>
+ #include <sys/types.h>
+ #include <stdlib.h>
++#include <stdint.h>
+ #include "un-namespace.h"
+ 
+ /* ARGSUSED */

+ 0 - 14
package/libtirpc/patches/patch-tirpc_rpc_rpcent_h

@@ -1,14 +0,0 @@
---- libtirpc-1.0.1.orig/tirpc/rpc/rpcent.h	2015-10-30 16:15:14.000000000 +0100
-+++ libtirpc-1.0.1/tirpc/rpc/rpcent.h	2015-11-29 16:38:28.630648509 +0100
-@@ -48,8 +48,9 @@
- extern "C" {
- #endif
- 
--/* These are defined in /usr/include/rpc/netdb.h */
--#if !defined(__GLIBC__)
-+/* These are defined in /usr/include/rpc/netdb.h, unless we are using
-+   the C library without RPC support. */
-+#if defined(__UCLIBC__) && !defined(__UCLIBC_HAS_RPC__) || !defined(__GLIBC__)
- struct rpcent {
- 	char	*r_name;	/* name of server for this rpc program */
- 	char	**r_aliases;	/* alias list */