]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Fix idle struct addrinfo definition.
authorAmos Jeffries <amosjeffries@squid-cache.org>
Sat, 23 Oct 2010 13:50:24 +0000 (07:50 -0600)
committerAmos Jeffries <amosjeffries@squid-cache.org>
Sat, 23 Oct 2010 13:50:24 +0000 (07:50 -0600)
ai_addrlen is defined formally as socklen_t not size_t. This could have
caused problems if the idle version were ever used.

Found during investigation of bug 3057 by "Anonymous".

include/getaddrinfo.h

index a0aabf7347290d78a6b63063cc9e03ff33dd4b44..ec34ca19e95f68b308cea2b5851671033b8c1575 100644 (file)
@@ -62,7 +62,7 @@ struct addrinfo {
     int ai_family;             /* PF_xxx */
     int ai_socktype;           /* SOCK_xxx */
     int ai_protocol;           /* 0 or IPPROTO_xxx for IPv4 and IPv6 */
-    size_t ai_addrlen;         /* length of ai_addr */
+    socklen_t ai_addrlen;      /* length of ai_addr */
     char *ai_canonname;                /* canonical name for nodename */
     struct sockaddr *ai_addr;  /* binary address */
     struct addrinfo *ai_next;  /* next structure in linked list */