summaryrefslogtreecommitdiffstats
path: root/chromium/patches/027-temp-failure-retry.patch
diff options
context:
space:
mode:
authorzorz <zorz@krypt.sh>2026-04-02 01:11:55 +0300
committerzorz <zorz@krypt.sh>2026-04-02 01:11:55 +0300
commit936433a5deb6ccc8f8476096f2c2b8dc72c33388 (patch)
treefe62acdddbfc42bc377383f5706f2c64120b942c /chromium/patches/027-temp-failure-retry.patch
parent16d3c790c04095ea1c8488116f56719e5480efb7 (diff)
downloadzorz-936433a5deb6ccc8f8476096f2c2b8dc72c33388.tar.gz
zorz-936433a5deb6ccc8f8476096f2c2b8dc72c33388.tar.xz
chromium musl
Diffstat (limited to 'chromium/patches/027-temp-failure-retry.patch')
-rw-r--r--chromium/patches/027-temp-failure-retry.patch22
1 files changed, 22 insertions, 0 deletions
diff --git a/chromium/patches/027-temp-failure-retry.patch b/chromium/patches/027-temp-failure-retry.patch
new file mode 100644
index 0000000..dc9ac6f
--- /dev/null
+++ b/chromium/patches/027-temp-failure-retry.patch
@@ -0,0 +1,22 @@
1random glibc macro, not provided by musl.
2https://www.gnu.org/software/libc/manual/html_node/Interrupted-Primitives.html
3diff --git a/sandbox/linux/suid/process_util.h b/sandbox/linux/suid/process_util.h
4index b0b92c1bcc..db6a122ea8 100644
5--- a/sandbox/linux/suid/process_util.h
6+++ b/sandbox/linux/suid/process_util.h
7@@ -12,6 +12,15 @@
8 #include <stdint.h>
9 #include <sys/types.h>
10
11+#define TEMP_FAILURE_RETRY(expression) \
12+ (__extension__({ \
13+ long int __result; \
14+ do \
15+ __result = (long int)(expression); \
16+ while (__result == -1L && errno == EINTR); \
17+ __result; \
18+ }))
19+
20 // This adjusts /proc/process/oom_score_adj so the Linux OOM killer
21 // will prefer certain process types over others. The range for the
22 // adjustment is [-1000, 1000], with [0, 1000] being user accessible.