2
0
mirror of https://codeberg.org/kiss-community/repo synced 2024-08-20 05:06:58 +00:00
repo/testing/qt5-webengine/patches/0011-chromium-musl-sandbox-Define-TEMP_FAILURE_RETRY-if-n.patch
2020-01-18 10:31:01 +02:00

34 lines
1.1 KiB
Diff

From d38a63908f5c49705abd85bd9c2aee0ec334221d Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Fri, 7 Jul 2017 14:01:12 -0700
Subject: [PATCH] chromium: musl: sandbox: Define TEMP_FAILURE_RETRY if not
defined
Musl does not define this Macro
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
chromium/sandbox/linux/suid/sandbox.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/chromium/sandbox/linux/suid/sandbox.c b/chromium/sandbox/linux/suid/sandbox.c
index 854819bfbb4..a99d32741d0 100644
--- a/src/3rdparty/chromium/sandbox/linux/suid/sandbox.c
+++ b/src/3rdparty/chromium/sandbox/linux/suid/sandbox.c
@@ -46,6 +46,15 @@ static bool DropRoot();
#define HANDLE_EINTR(x) TEMP_FAILURE_RETRY(x)
+#ifndef TEMP_FAILURE_RETRY
+# define TEMP_FAILURE_RETRY(expression) \
+ (__extension__ \
+ ({ long int __result; \
+ do __result = (long int) (expression); \
+ while (__result == -1L && errno == EINTR); \
+ __result; }))
+#endif
+
static void FatalError(const char* msg, ...)
__attribute__((noreturn, format(printf, 1, 2)));