diff options
author | Dominik Picheta <dominikpicheta@googlemail.com> | 2015-12-04 15:29:56 +0000 |
---|---|---|
committer | Dominik Picheta <dominikpicheta@googlemail.com> | 2015-12-04 15:29:56 +0000 |
commit | 6f09282352341d750332592fa06988102992a276 (patch) | |
tree | 43c999fee444f2819d5170178b68fc4c7448eed6 | |
parent | 60b23d1f7ad9160623005b5e96222d7c2527da2f (diff) | |
parent | e0835948bddacf3fb5eb23f228ffe3d014a09d93 (diff) | |
download | Nim-6f09282352341d750332592fa06988102992a276.tar.gz |
Merge pull request #3570 from juanfra684/patch-1
OpenBSD doesn't support AI_V4MAPPED
-rw-r--r-- | lib/pure/nativesockets.nim | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/pure/nativesockets.nim b/lib/pure/nativesockets.nim index c9e067a3e..9e6ff21ef 100644 --- a/lib/pure/nativesockets.nim +++ b/lib/pure/nativesockets.nim @@ -203,8 +203,10 @@ proc getAddrInfo*(address: string, port: Port, domain: Domain = AF_INET, hints.ai_family = toInt(domain) hints.ai_socktype = toInt(sockType) hints.ai_protocol = toInt(protocol) + # 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): + when not defined(freebsd) or defined(openbsd): hints.ai_flags = AI_V4MAPPED var gaiResult = getaddrinfo(address, $port, addr(hints), result) if gaiResult != 0'i32: |