aboutsummaryrefslogtreecommitdiff
path: root/src/lib/rpc
diff options
context:
space:
mode:
authorEzra Peisach <epeisach@mit.edu>2009-02-06 02:45:21 +0000
committerEzra Peisach <epeisach@mit.edu>2009-02-06 02:45:21 +0000
commit2538562271915fb954e8242a32443fc673ca13f4 (patch)
tree42f1997bda742ca37af7d21b00dc4c0c5e0188c9 /src/lib/rpc
parent80e2ebd2db159af751166664bb06192c4f32a69b (diff)
downloadkrb5-2538562271915fb954e8242a32443fc673ca13f4.zip
krb5-2538562271915fb954e8242a32443fc673ca13f4.tar.gz
krb5-2538562271915fb954e8242a32443fc673ca13f4.tar.bz2
Cleanup some warnings due to getsockname's third argument is sometimes
unsigned. Use GETSOCKNAME_ARG3_TYPE and fallback to int if not defined. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21904 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/lib/rpc')
-rw-r--r--src/lib/rpc/clnt_tcp.c6
-rw-r--r--src/lib/rpc/clnt_udp.c7
-rw-r--r--src/lib/rpc/pmap_rmt.c6
3 files changed, 15 insertions, 4 deletions
diff --git a/src/lib/rpc/clnt_tcp.c b/src/lib/rpc/clnt_tcp.c
index dc7e2ff..7168493 100644
--- a/src/lib/rpc/clnt_tcp.c
+++ b/src/lib/rpc/clnt_tcp.c
@@ -64,6 +64,10 @@ static char sccsid[] = "@(#)clnt_tcp.c 1.37 87/10/05 Copyr 1984 Sun Micro";
#define MCALL_MSG_SIZE 24
+#ifndef GETSOCKNAME_ARG3_TYPE
+#define GETSOCKNAME_ARG3_TYPE int
+#endif
+
static enum clnt_stat clnttcp_call(CLIENT *, rpcproc_t, xdrproc_t, void *,
xdrproc_t, void *, struct timeval);
static void clnttcp_abort(CLIENT *);
@@ -372,7 +376,7 @@ clnttcp_control(
void *info)
{
register struct ct_data *ct = (struct ct_data *)cl->cl_private;
- int len;
+ GETSOCKNAME_ARG3_TYPE len;
switch (request) {
case CLSET_TIMEOUT:
diff --git a/src/lib/rpc/clnt_udp.c b/src/lib/rpc/clnt_udp.c
index 8722e75..25474b9 100644
--- a/src/lib/rpc/clnt_udp.c
+++ b/src/lib/rpc/clnt_udp.c
@@ -52,6 +52,9 @@ static char sccsid[] = "@(#)clnt_udp.c 1.39 87/08/11 Copyr 1984 Sun Micro";
#include <port-sockets.h>
#include <errno.h>
+#ifndef GETSOCKNAME_ARG3_TYPE
+#define GETSOCKNAME_ARG3_TYPE int
+#endif
/*
* UDP bases client side rpc operations
@@ -82,7 +85,7 @@ struct cu_data {
struct sockaddr_in cu_raddr;
int cu_rlen;
struct sockaddr_in cu_laddr;
- int cu_llen;
+ GETSOCKNAME_ARG3_TYPE cu_llen;
struct timeval cu_wait;
struct timeval cu_total;
struct rpc_err cu_error;
@@ -235,7 +238,7 @@ clntudp_call(
register XDR *xdrs;
register int outlen;
register int inlen;
- int fromlen;
+ GETSOCKNAME_ARG3_TYPE fromlen; /* Assumes recvfrom uses same type */
#ifdef FD_SETSIZE
fd_set readfds;
fd_set mask;
diff --git a/src/lib/rpc/pmap_rmt.c b/src/lib/rpc/pmap_rmt.c
index d2e2ccd..dbe597d 100644
--- a/src/lib/rpc/pmap_rmt.c
+++ b/src/lib/rpc/pmap_rmt.c
@@ -64,6 +64,9 @@ static char sccsid[] = "@(#)pmap_rmt.c 1.21 87/08/27 Copyr 1984 Sun Micro";
static struct timeval timeout = { 3, 0 };
+#ifndef GETSOCKNAME_ARG3_TYPE
+#define GETSOCKNAME_ARG3_TYPE int
+#endif
/*
* pmapper remote-call-service interface.
@@ -245,7 +248,8 @@ clnt_broadcast(
AUTH *unix_auth = authunix_create_default();
XDR xdr_stream;
register XDR *xdrs = &xdr_stream;
- int outlen, inlen, fromlen, nets;
+ int outlen, inlen, nets;
+ GETSOCKNAME_ARG3_TYPE fromlen;
SOCKET sock;
int on = 1;
#ifdef FD_SETSIZE