commit a15b424cb5bbc7411d30d2e31420375b4167ea9e
parent aa3b3f27f1dfa5fa970b468a1b797ae42809c134
Author: Martin Schanzenbach <schanzen@gnunet.org>
Date: Mon, 4 Apr 2022 22:49:41 +0200
UTIL: OpenBSD does not implement unsafe srandom
Diffstat:
1 file changed, 4 insertions(+), 0 deletions(-)
diff --git 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
}