diff options
author | Anuken <arnukren@gmail.com> | 2021-11-13 19:09:15 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-13 19:09:15 -0500 |
commit | 270a5a372ddcb8fa97eacdf926dd90bfe189298f (patch) | |
tree | 2373068a144df9f9a800c1157a73d28c28d70f04 /lib/std/sysrand.nim | |
parent | ade85ee91fee849f4b036ed8e42e31b978144522 (diff) | |
download | Nim-270a5a372ddcb8fa97eacdf926dd90bfe189298f.tar.gz |
Fix undeclared 'SYS_getrandom' on emscripten (#19144)
Diffstat (limited to 'lib/std/sysrand.nim')
-rw-r--r-- | lib/std/sysrand.nim | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/std/sysrand.nim b/lib/std/sysrand.nim index b35f24a72..6b354e5a3 100644 --- a/lib/std/sysrand.nim +++ b/lib/std/sysrand.nim @@ -164,7 +164,7 @@ elif defined(windows): result = randomBytes(addr dest[0], size) -elif defined(linux) and not defined(nimNoGetRandom): +elif defined(linux) and not defined(nimNoGetRandom) and not defined(emscripten): # TODO using let, pending bootstrap >= 1.4.0 var SYS_getrandom {.importc: "SYS_getrandom", header: "<sys/syscall.h>".}: clong const syscallHeader = """#include <unistd.h> |