diff options
author | Dirk Engling <erdgeist@erdgeist.org> | 2021-04-20 04:05:50 +0200 |
---|---|---|
committer | Dirk Engling <erdgeist@erdgeist.org> | 2021-04-20 04:05:50 +0200 |
commit | b73b3b17ccf02337fb07f5ae78d78c2ff1dc3ccc (patch) | |
tree | 1ab5ec163419a5e6d275e0c5841e319c5a24976b /trackerlogic.h | |
parent | ccef1d0ccd0965ce91b2a439866dc1bd8301883d (diff) |
Use arc4random whereever we need strong entropy
Diffstat (limited to 'trackerlogic.h')
-rw-r--r-- | trackerlogic.h | 7 |
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 | |||
15 | typedef uint8_t ot_hash[20]; | 22 | typedef uint8_t ot_hash[20]; |
16 | typedef time_t ot_time; | 23 | typedef time_t ot_time; |
17 | typedef char ot_ip6[16]; | 24 | typedef char ot_ip6[16]; |