mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-20 21:33:27 -07: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.
This commit is contained in:
parent
66f3cf7e67
commit
661092147d
1 changed files with 1 additions and 1 deletions
|
@ -45,7 +45,7 @@ namespace
|
||||||
|
|
||||||
RandomLayer()
|
RandomLayer()
|
||||||
{
|
{
|
||||||
if (::getrandom(nullptr, 0, 0) < 0)
|
if (unsigned char buf = 0; ::getrandom(&buf, sizeof(buf), 0) < 0)
|
||||||
{
|
{
|
||||||
if (errno == ENOSYS)
|
if (errno == ENOSYS)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue