mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-20 13:23:34 -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. PR #22987.
This commit is contained in:
parent
d76712256c
commit
a76f12f3db
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