mirror of
https://github.com/oxen-io/lokinet.git
synced 2024-10-31 09:20:21 +00:00
So as of GCC 9.2, std::random_device on Windows is RtlGenRandom()
....which is precisely the thing i patch out in libsodium to use CryptoAPI documented interfaces instead (which fall through to RtlGenRandom() on such devices _anyway_) we can just use libsodium directly, i happened to patch it out in libstdc++ as a side effect (since my local toolchain can target any version of windows)
This commit is contained in:
parent
c9f2f90e13
commit
b449e03f43
@ -276,7 +276,7 @@ namespace llarp
|
||||
|
||||
if(lookupRouters.size() > LookupPerTick)
|
||||
{
|
||||
static std::mt19937_64 rng{std::random_device{}()};
|
||||
static std::mt19937_64 rng{llarp::randint()};
|
||||
std::shuffle(lookupRouters.begin(), lookupRouters.end(), rng);
|
||||
lookupRouters.resize(LookupPerTick);
|
||||
}
|
||||
|
@ -10,6 +10,7 @@
|
||||
#include <sys/endian.h>
|
||||
#elif defined(__sun)
|
||||
#include <sys/byteorder.h>
|
||||
#include <endian.h>
|
||||
#define htobe16(x) htons(x)
|
||||
#define htole16(x) (x)
|
||||
#define be16toh(x) ntohs(x)
|
||||
|
Loading…
Reference in New Issue
Block a user