From 4e9ed06f8f8a0cd9f34a6830c0ff14344a528042 Mon Sep 17 00:00:00 2001 From: Greg Banks Date: Mon, 3 Jul 2006 15:59:54 +1000 Subject: [PATCH] Use socklen_t some more to avoid warnings. --- support/nfs/conn.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/support/nfs/conn.c b/support/nfs/conn.c index 733bf24..89f7676 100644 --- a/support/nfs/conn.c +++ b/support/nfs/conn.c @@ -6,6 +6,7 @@ * */ +#include "config.h" #include #include #include @@ -18,6 +19,10 @@ #include "conn.h" +#if SIZEOF_SOCKLEN_T - 0 == 0 +#define socklen_t int +#endif + extern int verbose; /* Map an NFS version into the corresponding Mountd version */ @@ -164,7 +169,7 @@ clnt_ping(struct sockaddr_in *saddr, const u_long prog, const u_long vers, if (sock != -1) { if (caddr) { /* Get the address of our end of this connection */ - int len = sizeof(*caddr); + socklen_t len = sizeof(*caddr); if (getsockname(sock, caddr, &len) != 0) caddr->sin_family = 0; } -- 2.39.2