aboutsummaryrefslogtreecommitdiff
path: root/src/random.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/random.cpp')
-rw-r--r--src/random.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/random.cpp b/src/random.cpp
index b004dcac39..fee6c2d92a 100644
--- a/src/random.cpp
+++ b/src/random.cpp
@@ -11,14 +11,15 @@
#include <compat.h> // for Windows API
#include <wincrypt.h>
#endif
-#include <util.h> // for LogPrint()
-#include <utilstrencodings.h> // for GetTime()
+#include <logging.h> // for LogPrint()
+#include <utiltime.h> // for GetTime()
#include <stdlib.h>
#include <chrono>
#include <thread>
#ifndef WIN32
+#include <fcntl.h>
#include <sys/time.h>
#endif
@@ -33,6 +34,7 @@
#include <sys/random.h>
#endif
#ifdef HAVE_SYSCTL_ARND
+#include <utilstrencodings.h> // for ARRAYLEN
#include <sys/sysctl.h>
#endif
@@ -178,7 +180,7 @@ static void RandAddSeedPerfmon()
/** Fallback: get 32 bytes of system entropy from /dev/urandom. The most
* compatible way to get cryptographic randomness on UNIX-ish platforms.
*/
-void GetDevURandom(unsigned char *ent32)
+static void GetDevURandom(unsigned char *ent32)
{
int f = open("/dev/urandom", O_RDONLY);
if (f == -1) {