]> git.decadent.org.uk Git - nfs-utils.git/blobdiff - utils/statd/rmtcall.c
Detect if glibc provides socklen_t and use that instead
[nfs-utils.git] / utils / statd / rmtcall.c
index 7684b3b51eb142b3c7f18e760868cd0575521729..35cbccb54029fabdbb068a366c7d25000bbc4212 100644 (file)
 #include "log.h"
 #include "ha-callout.h"
 
+#if SIZEOF_SOCKLEN_T - 0 == 0
+#define socklen_t int
+#endif
+
 #define MAXMSGSIZE     (2048 / sizeof(unsigned int))
 
 static unsigned long   xid = 0;        /* RPC XID counter */
@@ -278,7 +282,7 @@ recv_rply(int sockfd, struct sockaddr_in *sin, u_long *portp)
        struct rpc_msg          mesg;
        notify_list             *lp = NULL;
        XDR                     xdr, *xdrs = &xdr;
-       int                     alen = sizeof(*sin);
+       socklen_t               alen = sizeof(*sin);
 
        /* Receive message */
        if ((msglen = recvfrom(sockfd, msgbuf, sizeof(msgbuf), 0,