summary refs log tree commit diff stats
path: root/lib/pure/net.nim
diff options
context:
space:
mode:
Diffstat (limited to 'lib/pure/net.nim')
-rw-r--r--lib/pure/net.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/pure/net.nim b/lib/pure/net.nim
index a5bdf3ce6..43284f872 100644
--- a/lib/pure/net.nim
+++ b/lib/pure/net.nim
@@ -1295,7 +1295,7 @@ proc recvFrom*(socket: Socket, data: var string, length: int,
 
   if result != -1:
     data.setLen(result)
-    address = $inet_ntoa(sockAddress.sin_addr)
+    address = getAddrString(cast[ptr SockAddr](addr(sockAddress)))
     port = ntohs(sockAddress.sin_port).Port
   else:
     raiseOSError(osLastError())