libtirpc/libtirpc-1.0.3-rc1.patch
Steve Dickson fe8ca5ba66 Update to latest upstream RC release: libtirpc-1-0-3-rc1
Signed-off-by: Steve Dickson <steved@redhat.com>
2017-11-14 11:39:16 -05:00

113 lines
3.0 KiB
Diff

diff --git a/src/auth_time.c b/src/auth_time.c
index 7f83ab4..69400bc 100644
--- a/src/auth_time.c
+++ b/src/auth_time.c
@@ -317,7 +317,7 @@ __rpc_get_time_offset(td, srv, thost, uaddr, netid)
sprintf(ipuaddr, "%d.%d.%d.%d.0.111", a1, a2, a3, a4);
useua = &ipuaddr[0];
- bzero((char *)&sin, sizeof(sin));
+ memset(&sin, 0, sizeof(sin));
if (uaddr_to_sockaddr(useua, &sin)) {
msg("unable to translate uaddr to sockaddr.");
if (needfree)
diff --git a/src/des_impl.c b/src/des_impl.c
index 9dbccaf..15bec2a 100644
--- a/src/des_impl.c
+++ b/src/des_impl.c
@@ -588,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/libtirpc.map b/src/libtirpc.map
index f385de5..21d6065 100644
--- a/src/libtirpc.map
+++ b/src/libtirpc.map
@@ -298,7 +298,7 @@ TIRPC_0.3.2 {
key_gendes;
key_get_conv;
key_setsecret;
- key_secret_is_set;
+ key_secretkey_is_set;
key_setnet;
netname2host;
netname2user;
diff --git a/src/svc_auth_des.c b/src/svc_auth_des.c
index 2e90146..19a7c60 100644
--- a/src/svc_auth_des.c
+++ b/src/svc_auth_des.c
@@ -356,7 +356,7 @@ cache_init()
authdes_cache = (struct cache_entry *)
mem_alloc(sizeof(struct cache_entry) * AUTHDES_CACHESZ);
- bzero((char *)authdes_cache,
+ memset(authdes_cache, 0,
sizeof(struct cache_entry) * AUTHDES_CACHESZ);
authdes_lru = (short *)mem_alloc(sizeof(short) * AUTHDES_CACHESZ);
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/tirpc/rpc/pmap_clnt.h b/tirpc/rpc/pmap_clnt.h
index 6abd583..cf1ab61 100644
--- a/tirpc/rpc/pmap_clnt.h
+++ b/tirpc/rpc/pmap_clnt.h
@@ -64,6 +64,10 @@
#ifndef _RPC_PMAP_CLNT_H_
#define _RPC_PMAP_CLNT_H_
+#include <rpc/types.h>
+#include <rpc/xdr.h>
+#include <rpc/clnt.h>
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/tirpc/rpc/types.h b/tirpc/rpc/types.h
index 52c30a2..f069efa 100644
--- a/tirpc/rpc/types.h
+++ b/tirpc/rpc/types.h
@@ -65,6 +65,28 @@ typedef int32_t rpc_inline_t;
#define mem_alloc(bsize) calloc(1, bsize)
#define mem_free(ptr, bsize) free(ptr)
+
+#if defined __APPLE_CC__ || defined __FreeBSD__
+# define __u_char_defined
+# define __daddr_t_defined
+#endif
+
+#ifndef __u_char_defined
+typedef __u_char u_char;
+typedef __u_short u_short;
+typedef __u_int u_int;
+typedef __u_long u_long;
+typedef __quad_t quad_t;
+typedef __u_quad_t u_quad_t;
+typedef __fsid_t fsid_t;
+# define __u_char_defined
+#endif
+#ifndef __daddr_t_defined
+typedef __daddr_t daddr_t;
+typedef __caddr_t caddr_t;
+# define __daddr_t_defined
+#endif
+
#include <sys/time.h>
#include <sys/param.h>
#include <stdlib.h>