From 31cc1815d147d3f5eaa0c9c844bcf803b070b37a Mon Sep 17 00:00:00 2001 From: def Date: Wed, 23 Dec 2015 04:13:30 +0100 Subject: [PATCH] Fix nativesockets compilation on OpenBSD and NetBSD --- lib/pure/nativesockets.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/pure/nativesockets.nim b/lib/pure/nativesockets.nim index 8a77805704..b5a8d57772 100644 --- a/lib/pure/nativesockets.nim +++ b/lib/pure/nativesockets.nim @@ -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)