random.cpp
needs to explicitly include utilstrencodings.h
to get ARRAYLEN
. This fixes the FreeBSD build.
This was broken in 84f41946b9026e8bf7bc44ed848dfb945394b693 (#13236).
random.cpp
needs to explicitly include utilstrencodings.h
to get ARRAYLEN
. This fixes the FreeBSD build.
This was broken in 84f41946b9026e8bf7bc44ed848dfb945394b693 (#13236).
11@@ -12,6 +12,7 @@
12 #include <wincrypt.h>
13 #endif
14 #include <logging.h> // for LogPrint()
15+#include <utilstrencodings.h> // for ARRAYLEN
#elif defined(HAVE_SYSCTL_ARND)
guard, so you might as well guard the include.
utACK e8fe9fc361d1acb9183d7bcd9a7aa0ca53c38af5
Though, I think the include should be moved into the #ifdef HAVE_SYSCTL_ARND
, so that this doesn’t happen again in the future.
To work around the whole utilstrencodings
header, you could include and switch to the cpp11 std::array
.
Feel free to ignore my style nits.
To work around the whole utilstrencodings header, you could include and switch to the cpp11 std::array.
I don’t want to ‘work around’ utilstrencodings, I simply want this to build on FreeBSD again :(
nit: This is only needed when within the body of the #elif defined(HAVE_SYSCTL_ARND) guard, so you might as well guard the include. There’s an existing block at line 36.
Good idea, will move it into that (edit: done, and it still works).
`random.cpp` needs to explicitly include `utilstrencodings.h` to get
`ARRAYLEN`. This fixes the FreeBSD build.
This was broken in 84f41946b9026e8bf7bc44ed848dfb945394b693.