SecBSD's official ports repository

This commit is contained in:
purplerain 2023-08-16 22:26:55 +00:00
commit 2c0afcbbf3
Signed by: purplerain
GPG key ID: F42C07F07E2E35B7
64331 changed files with 5339189 additions and 0 deletions

View file

@ -0,0 +1,23 @@
Index: src/hashtable_seed.c
--- src/hashtable_seed.c.orig
+++ src/hashtable_seed.c
@@ -44,6 +44,11 @@
#include "jansson.h"
+#if defined(__OpenBSD__)
+static uint32_t generate_seed() {
+ return arc4random();
+}
+#else
static uint32_t buf_to_uint32(char *data) {
size_t i;
uint32_t result = 0;
@@ -190,6 +195,7 @@ static uint32_t generate_seed() {
return seed;
}
+#endif /* OpenBSD */
volatile uint32_t hashtable_seed = 0;