summary refs log tree commit diff stats
path: root/lib/std/sysrand.nim
diff options
context:
space:
mode:
Diffstat (limited to 'lib/std/sysrand.nim')
-rw-r--r--lib/std/sysrand.nim4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/std/sysrand.nim b/lib/std/sysrand.nim
index 7943f2e1b..6f2c6b0c1 100644
--- a/lib/std/sysrand.nim
+++ b/lib/std/sysrand.nim
@@ -60,7 +60,7 @@ when not defined(js):
   import std/oserrors
 
 when defined(posix):
-  import posix
+  import std/posix
 
 when defined(nimPreviewSlimSystem):
   import std/assertions
@@ -192,7 +192,7 @@ elif defined(linux) and not defined(nimNoGetRandom) and not defined(emscripten):
     while result < size:
       let readBytes = syscall(SYS_getrandom, addr dest[result], cint(size - result), 0).int
       if readBytes == 0:
-        doAssert false
+        raiseAssert "unreachable"
       elif readBytes > 0:
         inc(result, readBytes)
       else: