aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/rng
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/rng')
-rw-r--r--src/lib/rng/system_rng/system_rng.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lib/rng/system_rng/system_rng.cpp b/src/lib/rng/system_rng/system_rng.cpp
index 78d258bb4..3c2e98661 100644
--- a/src/lib/rng/system_rng/system_rng.cpp
+++ b/src/lib/rng/system_rng/system_rng.cpp
@@ -51,7 +51,10 @@ class System_RNG_Impl final : public RandomNumberGenerator
void clear() override { /* not possible */ }
std::string name() const override { return "RtlGenRandom"; }
private:
- using RtlGenRandom_fptr = BOOLEAN (NTAPI *)(PVOID, ULONG);
+ // Use type BYTE instead of BOOLEAN because of a naming conflict
+ // https://msdn.microsoft.com/en-us/library/windows/desktop/aa387694(v=vs.85).aspx
+ // https://msdn.microsoft.com/en-us/library/windows/desktop/aa383751(v=vs.85).aspx
+ using RtlGenRandom_fptr = BYTE (NTAPI *)(PVOID, ULONG);
Dynamically_Loaded_Library m_advapi;
RtlGenRandom_fptr m_rtlgenrandom;