mirror of
https://github.com/status-im/nim-chronos.git
synced 2025-01-22 01:10:12 +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"
|
packageName = "asyncdispatch2"
|
||||||
version = "2.1.1"
|
version = "2.1.2"
|
||||||
author = "Status Research & Development GmbH"
|
author = "Status Research & Development GmbH"
|
||||||
description = "Asyncdispatch2"
|
description = "Asyncdispatch2"
|
||||||
license = "Apache License 2.0 or MIT"
|
license = "Apache License 2.0 or MIT"
|
||||||
|
@ -389,13 +389,13 @@ when defined(windows):
|
|||||||
result = true
|
result = true
|
||||||
if domain == Domain.AF_INET6:
|
if domain == Domain.AF_INET6:
|
||||||
var saddr: Sockaddr_in6
|
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)),
|
if bindAddr(SocketHandle(handle), cast[ptr SockAddr](addr(saddr)),
|
||||||
sizeof(saddr).SockLen) != 0'i32:
|
sizeof(saddr).SockLen) != 0'i32:
|
||||||
result = false
|
result = false
|
||||||
else:
|
else:
|
||||||
var saddr: Sockaddr_in
|
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)),
|
if bindAddr(SocketHandle(handle), cast[ptr SockAddr](addr(saddr)),
|
||||||
sizeof(saddr).SockLen) != 0'i32:
|
sizeof(saddr).SockLen) != 0'i32:
|
||||||
result = false
|
result = false
|
||||||
|
Loading…
x
Reference in New Issue
Block a user