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)),
d='n158' href='#n158'>158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226