From a27429304e77ced5b9ba5729e47d6d6c7b7dae5c Mon Sep 17 00:00:00 2001 From: LemonBoy Date: Wed, 19 Sep 2018 09:24:30 +0200 Subject: Convert *_family fields to cushort Fixes #9008 --- tests/async/tasyncawait.nim | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'tests/async/tasyncawait.nim') diff --git a/tests/async/tasyncawait.nim b/tests/async/tasyncawait.nim index 74933f063..e7a2ec1d9 100644 --- a/tests/async/tasyncawait.nim +++ b/tests/async/tasyncawait.nim @@ -41,10 +41,7 @@ proc createServer(port: Port) {.async.} = var server = newAsyncNativeSocket() block: var name: Sockaddr_in - when defined(windows): - name.sin_family = toInt(AF_INET).int16 - else: - name.sin_family = toInt(AF_INET) + name.sin_family = toInt(AF_INET).uint16 name.sin_port = htons(uint16(port)) name.sin_addr.s_addr = htonl(INADDR_ANY) if bindAddr(server.SocketHandle, cast[ptr SockAddr](addr(name)), -- cgit 1.4.1-2-gfad0