Should be self-explaining...

felix
From 2269c7c18dbe905fa0c21d7c72b4d63299391e3f Mon Sep 17 00:00:00 2001
From: felix <fe...@call-with-current-continuation.org>
Date: Thu, 6 Sep 2018 12:25:20 +0200
Subject: [PATCH] Use arc4random_buf(3) on FreeBSD + DragonFly

---
 runtime.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/runtime.c b/runtime.c
index 518fb7cb..dbd73303 100644
--- a/runtime.c
+++ b/runtime.c
@@ -12577,7 +12577,7 @@ C_word C_random_bytes(C_word buf, C_word size)
   int r = 0;
   int off = 0;
 
-#ifdef __OpenBSD__
+#if defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__DragonFly__) 
   arc4random_buf(C_data_pointer(buf), count);
 #elif defined(SYS_getrandom) && defined(__NR_getrandom)
   static int use_urandom = 0;
-- 
2.16.2

_______________________________________________
Chicken-hackers mailing list
Chicken-hackers@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-hackers

Reply via email to