Merge pull request #3631 from yglukhov/getaddrinfo-android
Fixed getAddrInfo on android
This commit is contained in:
commit
6b3b7eef8f
1 changed files with 2 additions and 1 deletions
|
|
@ -207,6 +207,7 @@ proc getAddrInfo*(address: string, port: Port, domain: Domain = AF_INET,
|
||||||
# FreeBSD doesn't support AI_V4MAPPED but defines the macro.
|
# FreeBSD doesn't support AI_V4MAPPED but defines the macro.
|
||||||
# https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=198092
|
# https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=198092
|
||||||
when not defined(freebsd) or defined(openbsd):
|
when not defined(freebsd) or defined(openbsd):
|
||||||
|
if domain == AF_INET6:
|
||||||
hints.ai_flags = AI_V4MAPPED
|
hints.ai_flags = AI_V4MAPPED
|
||||||
var gaiResult = getaddrinfo(address, $port, addr(hints), result)
|
var gaiResult = getaddrinfo(address, $port, addr(hints), result)
|
||||||
if gaiResult != 0'i32:
|
if gaiResult != 0'i32:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue