Merge tag 'libnfs-1.9.6' of https://github.com/sahlberg/libnfs into upstream
[deb_libnfs.git] / lib / socket.c
index f973f0178b923a0dab3f369fea14a04b076e85ab..1c1853c7cd7989cb84ea3f52774f2e0c6782b4a1 100644 (file)
 #include <sys/socket.h>
 #endif
 
+#ifdef HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
+
 #ifdef HAVE_NETINET_TCP_H
 #include <netinet/tcp.h>
 #endif
@@ -68,6 +72,7 @@
 #include <fcntl.h>
 #include <string.h>
 #include <errno.h>
+#include <time.h>
 #include <sys/types.h>
 #include "libnfs-zdr.h"
 #include "libnfs.h"
@@ -506,7 +511,7 @@ static int rpc_connect_sockaddr_async(struct rpc_context *rpc, struct sockaddr_s
                                        ((struct sockaddr_in6 *)&ss)->sin6_port = port;
                                        ((struct sockaddr_in6 *)&ss)->sin6_family      = AF_INET6;
 #ifdef HAVE_SOCKADDR_LEN
-                                       ((struct sockaddr_in6 *)&ss)->sin6_len = sizeof(struct sockaddr6_in);
+                                       ((struct sockaddr_in6 *)&ss)->sin6_len = sizeof(struct sockaddr_in6);
 #endif
                                        break;
                                }