aboutsummaryrefslogtreecommitdiffstats
path: root/erts/etc/common/inet_gethost.c
diff options
context:
space:
mode:
Diffstat (limited to 'erts/etc/common/inet_gethost.c')
-rw-r--r--erts/etc/common/inet_gethost.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/erts/etc/common/inet_gethost.c b/erts/etc/common/inet_gethost.c
index e095836258..ab24ac1048 100644
--- a/erts/etc/common/inet_gethost.c
+++ b/erts/etc/common/inet_gethost.c
@@ -65,10 +65,8 @@
#include <stdlib.h>
/* These are not used even if they would exist which they should not */
-#undef HAVE_GETADDRINFO
#undef HAVE_GETIPNODEBYNAME
#undef HAVE_GETHOSTBYNAME2
-#undef HAVE_GETNAMEINFO
#undef HAVE_GETIPNODEBYADDR
#else /* Unix */
@@ -1762,7 +1760,11 @@ static int worker_loop(void)
struct addrinfo hints;
memset(&hints, 0, sizeof(hints));
+#ifdef __WIN32__
+ hints.ai_flags = (AI_CANONNAME);
+#else
hints.ai_flags = (AI_CANONNAME|AI_V4MAPPED|AI_ADDRCONFIG);
+#endif
hints.ai_socktype = SOCK_STREAM;
hints.ai_family = AF_INET6;
DEBUGF(5, ("Starting getaddrinfo(%s, ...)", data));