Skip to content

Commit

Permalink
Fix undeclared 'SYS_getrandom' on emscripten (nim-lang#19144)
Browse files Browse the repository at this point in the history
  • Loading branch information
Anuken authored and PMunch committed Mar 28, 2022
1 parent 6970079 commit 500d610
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/std/sysrand.nim
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down

0 comments on commit 500d610

Please sign in to comment.