mirror of
https://github.com/nim-lang/Nim.git
synced 2026-02-13 06:43:52 +00:00
Fixed getAddrInfo on android
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user