mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-07 05:31:25 -07:00
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:
parent
9133b16431
commit
f51ad39ad9
4 changed files with 49 additions and 8 deletions
|
@ -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));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue