diff options
author | Patrik Nyblom <[email protected]> | 2010-12-01 12:08:43 +0100 |
---|---|---|
committer | Patrik Nyblom <[email protected]> | 2010-12-01 12:20:53 +0100 |
commit | c690c99dd434934a09f38b57d7598c8ecd1231eb (patch) | |
tree | 1356b13dc7c4630c2a9d4d068548207a4f278d60 /erts/etc/common | |
parent | 07881ee69f6fd9ae9d211b50bae1a22d553525d2 (diff) | |
download | otp-c690c99dd434934a09f38b57d7598c8ecd1231eb.tar.gz otp-c690c99dd434934a09f38b57d7598c8ecd1231eb.tar.bz2 otp-c690c99dd434934a09f38b57d7598c8ecd1231eb.zip |
Make windows inet_gethost work for ipv6
Diffstat (limited to 'erts/etc/common')
-rw-r--r-- | erts/etc/common/inet_gethost.c | 6 |
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)); |