Skip to content

Commit e2856d9

Browse files
committed
Create patch
1 parent b042f36 commit e2856d9

File tree

1 file changed

+26
-0
lines changed
  • patches/qbittorrent/5.1.2

1 file changed

+26
-0
lines changed

patches/qbittorrent/5.1.2/patch

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
From 661092147d1a5845de07ac9357a6511e781a2ed9 Mon Sep 17 00:00:00 2001
2+
From: Chocobo1 <[email protected]>
3+
Date: Sun, 13 Jul 2025 22:47:50 +0800
4+
Subject: [PATCH] Fix random function detection with static PIE builds
5+
6+
Certain build options didn't like the detection with an no-op. So make
7+
it really fetch a random value.
8+
9+
Closes #22981.
10+
---
11+
src/base/utils/randomlayer_linux.cpp | 2 +-
12+
1 file changed, 1 insertion(+), 1 deletion(-)
13+
14+
diff --git a/src/base/utils/randomlayer_linux.cpp b/src/base/utils/randomlayer_linux.cpp
15+
index 81310f3bb9c6..25608139ba14 100644
16+
--- a/src/base/utils/randomlayer_linux.cpp
17+
+++ b/src/base/utils/randomlayer_linux.cpp
18+
@@ -45,7 +45,7 @@ namespace
19+
20+
RandomLayer()
21+
{
22+
- if (::getrandom(nullptr, 0, 0) < 0)
23+
+ if (unsigned char buf = 0; ::getrandom(&buf, sizeof(buf), 0) < 0)
24+
{
25+
if (errno == ENOSYS)
26+
{

0 commit comments

Comments
 (0)