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 8dc92e9d6..c1d4c6228 100644
--- a/lib/pure/net.nim
+++ b/lib/pure/net.nim
@@ -1628,7 +1628,7 @@ proc recvFrom*[T: string | IpAddress](socket: Socket, data: var string, length:
   ##   used. Therefore if `socket` contains something in its buffer this
   ##   function will make no effort to return it.
   template adaptRecvFromToDomain(sockAddress: untyped, domain: Domain) =
-    var addrLen = sizeof(sockAddress).SockLen
+    var addrLen = SockLen(sizeof(sockAddress))
     result = recvfrom(socket.fd, cstring(data), length.cint, flags.cint,
                       cast[ptr SockAddr](addr(sockAddress)), addr(addrLen))