mirror of
https://github.com/status-im/nim-chronos.git
synced 2025-01-21 08:49:45 +00:00
Fix sockaddr.sin_family type conversion.
Bump version to 2.1.2.
This commit is contained in:
parent
74054428a4
commit
756f85576e
@ -1,5 +1,5 @@
|
||||
packageName = "asyncdispatch2"
|
||||
version = "2.1.1"
|
||||
version = "2.1.2"
|
||||
author = "Status Research & Development GmbH"
|
||||
description = "Asyncdispatch2"
|
||||
license = "Apache License 2.0 or MIT"
|
||||
|
@ -389,13 +389,13 @@ when defined(windows):
|
||||
result = true
|
||||
if domain == Domain.AF_INET6:
|
||||
var saddr: Sockaddr_in6
|
||||
saddr.sin6_family = int16(toInt(domain))
|
||||
saddr.sin6_family = type(saddr.sin6_family)(toInt(domain))
|
||||
if bindAddr(SocketHandle(handle), cast[ptr SockAddr](addr(saddr)),
|
||||
sizeof(saddr).SockLen) != 0'i32:
|
||||
result = false
|
||||
else:
|
||||
var saddr: Sockaddr_in
|
||||
saddr.sin_family = int16(toInt(domain))
|
||||
saddr.sin_family = type(saddr.sin_family)(toInt(domain))
|
||||
if bindAddr(SocketHandle(handle), cast[ptr SockAddr](addr(saddr)),
|
||||
sizeof(saddr).SockLen) != 0'i32:
|
||||
result = false
|
||||
|
Loading…
x
Reference in New Issue
Block a user