summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Modules/getaddrinfo.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Modules/getaddrinfo.c b/Modules/getaddrinfo.c
index f74b5d6..9bc9917 100644
--- a/Modules/getaddrinfo.c
+++ b/Modules/getaddrinfo.c
@@ -188,6 +188,7 @@ if (pai->ai_flags & AI_CANONNAME) {\
memcpy(ai, pai, sizeof(struct addrinfo));\
(ai)->ai_addr = (struct sockaddr *)((ai) + 1);\
memset((ai)->ai_addr, 0, (gai_afd)->a_socklen);\
+ (ai)->ai_addrlen = (gai_afd)->a_socklen;\
(ai)->ai_addr->sa_family = (ai)->ai_family = (gai_afd)->a_af;\
((struct sockinet *)(ai)->ai_addr)->si_port = port;\
p = (char *)((ai)->ai_addr);\