diff options
author | LemonBoy <thatlemon@gmail.com> | 2018-09-19 09:24:30 +0200 |
---|---|---|
committer | LemonBoy <thatlemon@gmail.com> | 2018-09-19 12:33:11 +0200 |
commit | a27429304e77ced5b9ba5729e47d6d6c7b7dae5c (patch) | |
tree | eff2d0b0f26c407d291a62b5ea5381c4ec5344e3 /tests/async/tnewasyncudp.nim | |
parent | a892d519a60e08212ea05e99bb9f858e6673ee6b (diff) | |
download | Nim-a27429304e77ced5b9ba5729e47d6d6c7b7dae5c.tar.gz |
Convert *_family fields to cushort
Fixes #9008
Diffstat (limited to 'tests/async/tnewasyncudp.nim')
-rw-r--r-- | tests/async/tnewasyncudp.nim | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/tests/async/tnewasyncudp.nim b/tests/async/tnewasyncudp.nim index e61f630e4..b442c0524 100644 --- a/tests/async/tnewasyncudp.nim +++ b/tests/async/tnewasyncudp.nim @@ -29,10 +29,7 @@ proc saveReceivedPort(port: int) = proc prepareAddress(intaddr: uint32, intport: uint16): ptr Sockaddr_in = result = cast[ptr Sockaddr_in](alloc0(sizeof(Sockaddr_in))) - when defined(windows): - result.sin_family = toInt(nativesockets.AF_INET).int16 - else: - result.sin_family = toInt(nativesockets.AF_INET) + result.sin_family = toInt(nativesockets.AF_INET).uint16 result.sin_port = nativesockets.htons(intport) result.sin_addr.s_addr = nativesockets.htonl(intaddr) |