mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-18 14:38:04 -06: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:
committed by
Vladimir Golovnev (Glassez)
parent
9133b16431
commit
f51ad39ad9
@@ -42,7 +42,7 @@
|
||||
|
||||
uint32_t Utils::Random::rand(const uint32_t min, const uint32_t max)
|
||||
{
|
||||
static RandomLayer layer;
|
||||
static const RandomLayer layer;
|
||||
|
||||
// new distribution is cheap: https://stackoverflow.com/a/19036349
|
||||
std::uniform_int_distribution<uint32_t> uniform(min, max);
|
||||
|
||||
Reference in New Issue
Block a user