summaryrefslogtreecommitdiff
path: root/absl/random
diff options
context:
space:
mode:
Diffstat (limited to 'absl/random')
-rw-r--r--absl/random/internal/seed_material.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/absl/random/internal/seed_material.cc b/absl/random/internal/seed_material.cc
index 7c1d9efa..c03cad85 100644
--- a/absl/random/internal/seed_material.cc
+++ b/absl/random/internal/seed_material.cc
@@ -57,6 +57,12 @@
#define ABSL_RANDOM_USE_GET_ENTROPY 1
#endif
+#if defined(__EMSCRIPTEN__)
+#include <sys/random.h>
+// Emscripten has getentropy, but it resides in a different header.
+#define ABSL_RANDOM_USE_GET_ENTROPY 1
+#endif
+
#if defined(ABSL_RANDOM_USE_BCRYPT)
#include <bcrypt.h>