diff options
author | ringabout <43030857+ringabout@users.noreply.github.com> | 2023-04-19 17:56:12 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-19 11:56:12 +0200 |
commit | 135b677704110af999797ee375a15a7e33af04c4 (patch) | |
tree | 57a1fcaa1cf3b4bd60f2db149607705bfefd1b2a | |
parent | 9cb06d357e75bdf74f99e1e982841d8bbe90ae0e (diff) | |
download | Nim-135b677704110af999797ee375a15a7e33af04c4.tar.gz |
fixes nightlies regression (#21689)
* fixes nightlies regression ref https://github.com/nim-lang/Nim/pull/21659 ref https://github.com/nim-lang/nightlies/actions/runs/4727252660/jobs/8387899690 > /home/runner/work/nightlies/nightlies/nim-1.9.3/lib/std/sysrand.nim(198, 12) Error: cannot evaluate at compile time: EINTR Because EINTR is not a const on i386 * Update lib/std/sysrand.nim
-rw-r--r-- | lib/std/sysrand.nim | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/std/sysrand.nim b/lib/std/sysrand.nim index b5f61372a..d57f2845e 100644 --- a/lib/std/sysrand.nim +++ b/lib/std/sysrand.nim @@ -194,8 +194,7 @@ elif defined(linux) and not defined(nimNoGetRandom) and not defined(emscripten): elif readBytes > 0: inc(result, readBytes) else: - case osLastError().int - of EINTR, EAGAIN: discard + if osLastError().cint in [EINTR, EAGAIN]: discard else: result = -1 break |