aboutsummaryrefslogtreecommitdiff
path: root/src/platform/windows/win_resolv.c
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2018-05-15 19:23:05 -0700
committerGarrett D'Amore <garrett@damore.org>2018-05-15 19:23:05 -0700
commit59ee3628d5db511ce5527ce4ddbf126e929d7da8 (patch)
treeb50ee899adbc7a1066f8b0ced2316773ee2f064e /src/platform/windows/win_resolv.c
parentf69b4c1da69d1e9c513ad63da488a49b6b46a706 (diff)
downloadnng-59ee3628d5db511ce5527ce4ddbf126e929d7da8.tar.gz
nng-59ee3628d5db511ce5527ce4ddbf126e929d7da8.tar.bz2
nng-59ee3628d5db511ce5527ce4ddbf126e929d7da8.zip
fixes #430 Unable to build in MSYS + Win-builds
fixes #438 Consider dropping AI_V4MAPPED
Diffstat (limited to 'src/platform/windows/win_resolv.c')
-rw-r--r--src/platform/windows/win_resolv.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/platform/windows/win_resolv.c b/src/platform/windows/win_resolv.c
index 2bc68c32..54f1c61c 100644
--- a/src/platform/windows/win_resolv.c
+++ b/src/platform/windows/win_resolv.c
@@ -127,15 +127,12 @@ win_resolv_task(void *arg)
// We treat these all as IP addresses. The service and the
// host part are split.
memset(&hints, 0, sizeof(hints));
+ hints.ai_flags = AI_ADDRCONFIG | AI_NUMERICSERV;
if (item->passive) {
hints.ai_flags |= AI_PASSIVE;
}
- hints.ai_flags |= AI_ADDRCONFIG;
hints.ai_protocol = item->proto;
hints.ai_family = item->family;
- if (item->family == AF_INET6) {
- hints.ai_flags |= AI_V4MAPPED;
- }
rv = getaddrinfo(item->name, item->serv, &hints, &results);
if (rv != 0) {