Update net.nim (#19327) [backport]
This commit is contained in:
parent
9df195ef58
commit
5ec8b60942
1 changed files with 1 additions and 1 deletions
|
|
@ -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))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue