X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=support%2Fnfs%2Fconn.c;h=89f767676b2aeb5f85d0b485c6865b6f5837c2bb;hb=bf7a9f93764b171921e6af1385aace0ab52aa51e;hp=5160c8b29c2fd2c1632be80cbe67adbe1a0fda38;hpb=c2db41e8abb6ddc9d03a0c91c6db043fa0f85a8f;p=nfs-utils.git diff --git a/support/nfs/conn.c b/support/nfs/conn.c index 5160c8b..89f7676 100644 --- a/support/nfs/conn.c +++ b/support/nfs/conn.c @@ -6,7 +6,9 @@ * */ +#include "config.h" #include +#include #include #include #include @@ -17,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 */ @@ -163,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; }