summaryrefslogtreecommitdiff
path: root/trackerlogic.h
diff options
context:
space:
mode:
authorDirk Engling <erdgeist@erdgeist.org>2021-04-20 04:05:50 +0200
committerDirk Engling <erdgeist@erdgeist.org>2021-04-20 04:05:50 +0200
commitb73b3b17ccf02337fb07f5ae78d78c2ff1dc3ccc (patch)
tree1ab5ec163419a5e6d275e0c5841e319c5a24976b /trackerlogic.h
parentccef1d0ccd0965ce91b2a439866dc1bd8301883d (diff)
Use arc4random whereever we need strong entropy
Diffstat (limited to 'trackerlogic.h')
-rw-r--r--trackerlogic.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/trackerlogic.h b/trackerlogic.h
index 33dccbe..87b9138 100644
--- a/trackerlogic.h
+++ b/trackerlogic.h
@@ -12,6 +12,13 @@
12#include <stdint.h> 12#include <stdint.h>
13#include <stdlib.h> 13#include <stdlib.h>
14 14
15#if defined(__linux__) && defined(WANT_ARC4RANDOM)
16#include <bsd/stdlib.h>
17#endif
18#ifdef __FreeBSD__
19#define WANT_ARC4RANDOM
20#endif
21
15typedef uint8_t ot_hash[20]; 22typedef uint8_t ot_hash[20];
16typedef time_t ot_time; 23typedef time_t ot_time;
17typedef char ot_ip6[16]; 24typedef char ot_ip6[16];