SecBSD's official ports repository
This commit is contained in:
commit
2c0afcbbf3
64331 changed files with 5339189 additions and 0 deletions
23
devel/jansson/patches/patch-src_hashtable_seed_c
Normal file
23
devel/jansson/patches/patch-src_hashtable_seed_c
Normal 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;
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue