Add fallback for random number generator

`getrandom()` is available since Linux 3.17 (2014/10/05) yet there are older devices that don't
meet this requirement.

Closes #22691.
PR #22723.
This commit is contained in:
Chocobo1
2025-05-18 15:37:17 +08:00
committed by GitHub
parent 6c310aa311
commit 1662a9deb2
4 changed files with 49 additions and 8 deletions

View File

@@ -60,7 +60,7 @@ namespace
return std::numeric_limits<result_type>::max();
}
result_type operator()()
result_type operator()() const
{
result_type buf = 0;
const bool result = m_processPrng(reinterpret_cast<PBYTE>(&buf), sizeof(buf));