diff options
author | Yuriy Glukhov <yuriy.glukhov@gmail.com> | 2015-12-08 12:30:38 +0200 |
---|---|---|
committer | Yuriy Glukhov <yuriy.glukhov@gmail.com> | 2015-12-08 12:30:38 +0200 |
commit | 5545d36330e03eab32773f91f1a800d7181a0679 (patch) | |
tree | deed5440eded3fa5f361f5e7a2d894ad186962be /lib/pure | |
parent | ca47256efacf8cad6030c86ce02965cce66e6b37 (diff) | |
download | Nim-5545d36330e03eab32773f91f1a800d7181a0679.tar.gz |
Fixed getAddrInfo on android
Diffstat (limited to 'lib/pure')
-rw-r--r-- | lib/pure/nativesockets.nim | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/pure/nativesockets.nim b/lib/pure/nativesockets.nim index 9e6ff21ef..8a7780570 100644 --- a/lib/pure/nativesockets.nim +++ b/lib/pure/nativesockets.nim @@ -207,7 +207,8 @@ proc getAddrInfo*(address: string, port: Port, domain: Domain = AF_INET, # FreeBSD doesn't support AI_V4MAPPED but defines the macro. # https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=198092 when not defined(freebsd) or defined(openbsd): - hints.ai_flags = AI_V4MAPPED + if domain == AF_INET6: + hints.ai_flags = AI_V4MAPPED var gaiResult = getaddrinfo(address, $port, addr(hints), result) if gaiResult != 0'i32: when useWinVersion: |