aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/rng
diff options
context:
space:
mode:
authorSimon Warta <[email protected]>2018-05-08 00:29:05 +0200
committerSimon Warta <[email protected]>2018-05-08 00:29:05 +0200
commit819b7febe479dfa7f1c07ab52c890ca33b00f023 (patch)
tree65dc23567ade59586563c1b8215d0b5010e0a05d /src/lib/rng
parent9a0e2bd88458e176abb983c742a7156aaad0909a (diff)
Use type BYTE instead of BOOLEAN
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;