From 41be1c6c4dfe99989d746175dbb1904152302e8e Mon Sep 17 00:00:00 2001 From: Andrew Yourtchenko Date: Wed, 24 Jun 2015 02:08:17 +0200 Subject: [PATCH] Allow to connect to IPv4-mapped addresses for IPv6 sockets - thus full IPv4 compatibility. --- lib/pure/rawsockets.nim | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/pure/rawsockets.nim b/lib/pure/rawsockets.nim index c97718b0a9..9bfe9dab53 100644 --- a/lib/pure/rawsockets.nim +++ b/lib/pure/rawsockets.nim @@ -195,6 +195,7 @@ proc getAddrInfo*(address: string, port: Port, af: Domain = AF_INET, typ: SockTy hints.ai_family = toInt(af) hints.ai_socktype = toInt(typ) hints.ai_protocol = toInt(prot) + hints.ai_flags = posix.AI_V4MAPPED var gaiResult = getaddrinfo(address, $port, addr(hints), result) if gaiResult != 0'i32: when useWinVersion: