aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwhitequark <whitequark@whitequark.org>2020-06-26 10:45:03 +0000
committerwhitequark <whitequark@whitequark.org>2020-06-26 11:30:00 +0000
commit7ed94f51708f7838176bbb46ae680d967aaef744 (patch)
treeda238e9a8c7a839c533f6fef655c0ba9de91a451
parentf8b8ea0f3cdc4a2cf61a28c1ce44616555b62e4e (diff)
downloadicestorm-7ed94f51708f7838176bbb46ae680d967aaef744.tar.gz
icestorm-7ed94f51708f7838176bbb46ae680d967aaef744.tar.bz2
icestorm-7ed94f51708f7838176bbb46ae680d967aaef744.zip
icebram: add WASI platform support.
-rw-r--r--icebram/icebram.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/icebram/icebram.cc b/icebram/icebram.cc
index 1bb3095..aacf00c 100644
--- a/icebram/icebram.cc
+++ b/icebram/icebram.cc
@@ -179,7 +179,11 @@ int main(int argc, char **argv)
// to repeat simultaneously.
uint32_t seed_nr;
if (!seed) {
+#if defined(__wasm)
+ seed_nr = 0;
+#else
seed_nr = getpid();
+#endif
} else {
seed_nr = seed_opt;
}