summary refs log tree commit diff stats
path: root/tests/async/tasyncawait.nim
diff options
context:
space:
mode:
authorLemonBoy <thatlemon@gmail.com>2018-09-19 09:24:30 +0200
committerLemonBoy <thatlemon@gmail.com>2018-09-19 12:33:11 +0200
commita27429304e77ced5b9ba5729e47d6d6c7b7dae5c (patch)
treeeff2d0b0f26c407d291a62b5ea5381c4ec5344e3 /tests/async/tasyncawait.nim
parenta892d519a60e08212ea05e99bb9f858e6673ee6b (diff)
downloadNim-a27429304e77ced5b9ba5729e47d6d6c7b7dae5c.tar.gz
Convert *_family fields to cushort
Fixes #9008
Diffstat (limited to 'tests/async/tasyncawait.nim')
-rw-r--r--tests/async/tasyncawait.nim5
1 files changed, 1 insertions, 4 deletions
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)),