mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-17 06:01:33 -06:00
Fix random function detection with static PIE builds
Certain build options didn't like the detection with an no-op. So make it really fetch a random value. Closes #22981. PR #22987.
This commit is contained in:
committed by
Vladimir Golovnev (Glassez)
parent
d76712256c
commit
a76f12f3db
@@ -45,7 +45,7 @@ namespace
|
||||
|
||||
RandomLayer()
|
||||
{
|
||||
if (::getrandom(nullptr, 0, 0) < 0)
|
||||
if (unsigned char buf = 0; ::getrandom(&buf, sizeof(buf), 0) < 0)
|
||||
{
|
||||
if (errno == ENOSYS)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user