contrib: sockets: fix get-host-by-name

Remove flag AI_V4MAPPED which takes effect only for AF_INET6
family. Currently we do not work at all with ipv6, hence this flag is
a no-op. Moreover Android has no definition for this flag. See !172.

Fix contributed by Polos Ruetz. Closes !172.
This commit is contained in:
Daniel Kochmański 2019-12-30 10:39:13 +01:00
parent d6b577233b
commit ef450d9070

View file

@ -202,7 +202,7 @@ other weird stuff - see getaddrinfo(3) for details."
hints.ai_family = AF_INET; /* IPv4 */
hints.ai_socktype = 0; /* Any type */
hints.ai_protocol = 0; /* Any protocol */
hints.ai_flags = (AI_V4MAPPED | AI_ADDRCONFIG | AI_CANONNAME); /* Get cannonname */
hints.ai_flags = (AI_ADDRCONFIG | AI_CANONNAME); /* Get cannonname */
hints.ai_addr = NULL;
hints.ai_next = NULL;
struct addrinfo *result;