about summary refs log tree commit diff
path: root/sunrpc
diff options
context:
space:
mode:
Diffstat (limited to 'sunrpc')
-rw-r--r--sunrpc/clnt_simp.c3
-rw-r--r--sunrpc/rpc/auth_des.h6
-rw-r--r--sunrpc/rpc/pmap_rmt.h7
-rw-r--r--sunrpc/rpc/rpc_msg.h2
4 files changed, 14 insertions, 4 deletions
diff --git a/sunrpc/clnt_simp.c b/sunrpc/clnt_simp.c
index dd2ae75f1e..42ab1a28f8 100644
--- a/sunrpc/clnt_simp.c
+++ b/sunrpc/clnt_simp.c
@@ -118,7 +118,8 @@ callrpc(host, prognum, versnum, procnum, inproc, in, outproc, out)
 		crp->valid = 1;
 		crp->oldprognum = prognum;
 		crp->oldversnum = versnum;
-		(void) strcpy(crp->oldhost, host);
+		(void) strncpy(crp->oldhost, host, 255);
+		crp->oldhost[256] = '\0';
 	}
 	tottimeout.tv_sec = 25;
 	tottimeout.tv_usec = 0;
diff --git a/sunrpc/rpc/auth_des.h b/sunrpc/rpc/auth_des.h
index 097eb68771..8c2f794691 100644
--- a/sunrpc/rpc/auth_des.h
+++ b/sunrpc/rpc/auth_des.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -21,6 +21,8 @@
 #define _RPC_AUTH_DES_H	1
 #include <sys/cdefs.h>
 
+__BEGIN_DECLS
+
 /* This is no complete version of this header.  More definitions with
    the real authentication stuff will come in 1997.  For now we only
    need to define the function for handling public keys.  */
@@ -39,4 +41,6 @@ extern int getpublickey __P ((__const char *__name, char *__key));
 extern int getsecretkey __P ((__const char *__name, char *__key,
 			      __const char *__passwd));
 
+__END_DECLS
+
 #endif /* rpc/auth_des.h */
diff --git a/sunrpc/rpc/pmap_rmt.h b/sunrpc/rpc/pmap_rmt.h
index f5d4af110b..2e1af7e3d0 100644
--- a/sunrpc/rpc/pmap_rmt.h
+++ b/sunrpc/rpc/pmap_rmt.h
@@ -41,13 +41,15 @@
 #include <features.h>
 
 
+__BEGIN_DECLS
+
 struct rmtcallargs {
 	u_long prog, vers, proc, arglen;
 	caddr_t args_ptr;
 	xdrproc_t xdr_args;
 };
 
-bool_t xdr_rmtcall_args __P ((XDR *__xdrs, struct rmtcallargs *__crp));
+extern bool_t xdr_rmtcall_args __P ((XDR *__xdrs, struct rmtcallargs *__crp));
 
 struct rmtcallres {
 	u_long *port_ptr;
@@ -56,7 +58,8 @@ struct rmtcallres {
 	xdrproc_t xdr_results;
 };
 
-bool_t xdr_rmtcallres __P ((XDR *__xdrs, struct rmtcallres *__crp));
+extern bool_t xdr_rmtcallres __P ((XDR *__xdrs, struct rmtcallres *__crp));
 
+__END_DECLS
 
 #endif /* rpc/pmap_rmt.h */
diff --git a/sunrpc/rpc/rpc_msg.h b/sunrpc/rpc/rpc_msg.h
index 48ae1f988d..8f6b6a9da4 100644
--- a/sunrpc/rpc/rpc_msg.h
+++ b/sunrpc/rpc/rpc_msg.h
@@ -33,6 +33,8 @@
 #define _RPC_MSG_H 1
 #include <sys/cdefs.h>
 
+#include <rpc/clnt.h>
+
 /*
  * rpc_msg.h
  * rpc message definition