summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMartin Schanzenbach <schanzen@gnunet.org>2022-04-04 22:49:41 +0200
committerMartin Schanzenbach <schanzen@gnunet.org>2022-04-04 22:49:41 +0200
commita15b424cb5bbc7411d30d2e31420375b4167ea9e (patch)
tree876fc46be1596a4929b222f6a4d5f2285fcf1eb4 /src
parentaa3b3f27f1dfa5fa970b468a1b797ae42809c134 (diff)
UTIL: OpenBSD does not implement unsafe srandom
Diffstat (limited to 'src')
-rw-r--r--src/util/crypto_random.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/util/crypto_random.c b/src/util/crypto_random.c
index 0c5d6fe7e..dc2794554 100644
--- a/src/util/crypto_random.c
+++ b/src/util/crypto_random.c
@@ -96,7 +96,11 @@ get_weak_random (void)
void
GNUNET_CRYPTO_seed_weak_random (int32_t seed)
{
+#ifdef OPENBSD
+ srandom_deterministic (seed);
+#else
srandom (seed);
+#endif
}