Set AI_ADDRCONFIG during DNS resolution

This commit is contained in:
Cameron Gutman 2015-06-17 23:48:25 -07:00
parent 789eac8e6a
commit 0bb461ac85

View File

@ -131,6 +131,7 @@ static int resolveHostName(char *host)
memset(&hints, 0, sizeof(hints));
hints.ai_family = AF_UNSPEC;
hints.ai_flags = AI_ADDRCONFIG;
err = getaddrinfo(host, NULL, &hints, &res);
if (err != 0) {
return err;