Fix ipv4/ipv6 resolving. When not using AF_INET, gethostbyname2_r tries to resolve...