commit - affa03b277bb479c050f2d6967ae410e49e0d2ac
commit + fa09883c72855768a0f827a330097bf3dc5c839e
blob - 4f1d4ca40492562858e87357c107c320b85c48b2
blob + af524d091fa569dd874559a3f032f5dcc0cfde6d
--- src/ipaddr/ng_ipaddr.c
+++ src/ipaddr/ng_ipaddr.c
memset(&hints, 0, sizeof(hints));
hints.ai_flags = AI_NUMERICHOST;
+#ifndef WANT_IPV6 /* do not convert ipv6 addresses */
+ hints.ai_family = AF_INET;
+#endif
/* some getaddrinfo implementations require that ai_socktype is set. */
hints.ai_socktype = SOCK_STREAM;
snprintf(portstr, sizeof(portstr), "%u", (unsigned int) port);
ret = getaddrinfo(ip_str, portstr, &hints, &res0);
- assert(ret == 0);
if (ret != 0)
return false;