mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-02 19:22:40 +00:00
Fix nativesockets compilation on OpenBSD and NetBSD
This commit is contained in:
@@ -206,7 +206,7 @@ proc getAddrInfo*(address: string, port: Port, domain: Domain = AF_INET,
|
||||
# OpenBSD doesn't support AI_V4MAPPED and doesn't define the macro AI_V4MAPPED.
|
||||
# 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):
|
||||
when not defined(freebsd) and not defined(openbsd) and not defined(netbsd):
|
||||
if domain == AF_INET6:
|
||||
hints.ai_flags = AI_V4MAPPED
|
||||
var gaiResult = getaddrinfo(address, $port, addr(hints), result)
|
||||
|
||||
Reference in New Issue
Block a user