Set AI_ADDRCONFIG during DNS resolution
This commit is contained in:
parent
789eac8e6a
commit
0bb461ac85
1 changed files with 1 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue