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 Vladimir Golovnev (Glassez)
parent 9133b16431
commit f51ad39ad9
No known key found for this signature in database
GPG key ID: 52A2C7DEE2DFA6F7
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));