CONTRIB: tcploop: fix connect's address length
FreeBSD wants the address size to be correct, so let's pass the size
of a sockaddr_in struct, not the sockaddr_storage.
diff --git a/contrib/tcploop/tcploop.c b/contrib/tcploop/tcploop.c
index 9e6d747..d1995f4 100644
--- a/contrib/tcploop/tcploop.c
+++ b/contrib/tcploop/tcploop.c
@@ -424,7 +424,7 @@
if (setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, &one, sizeof(one)) == -1)
goto fail;
- if (connect(sock, (const struct sockaddr *)sa, sizeof(*sa)) < 0) {
+ if (connect(sock, (const struct sockaddr *)sa, sizeof(struct sockaddr_in)) < 0) {
if (errno != EINPROGRESS)
goto fail;
}