]> git.decadent.org.uk Git - nfs-utils.git/commitdiff
Use socklen_t some more to avoid warnings.
authorGreg Banks <gnb@melbourne.sgi.com>
Mon, 3 Jul 2006 05:59:54 +0000 (15:59 +1000)
committerGreg Banks <gnb@melbourne.sgi.com>
Mon, 3 Jul 2006 05:59:54 +0000 (15:59 +1000)
support/nfs/conn.c

index 733bf24f4bc0fccdb77011b9249f095a961b286b..89f767676b2aeb5f85d0b485c6865b6f5837c2bb 100644 (file)
@@ -6,6 +6,7 @@
  *
  */
 
+#include "config.h"
 #include <errno.h>
 #include <unistd.h>
 #include <rpc/rpc.h>
 
 #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;
                }