diff options
Diffstat (limited to 'lib')
-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 |