summaryrefslogtreecommitdiffstats
path: root/recipes-qt/qt5/qtwebengine/0004-chromium-musl-sandbox-Define-TEMP_FAILURE_RETRY-if-n.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-qt/qt5/qtwebengine/0004-chromium-musl-sandbox-Define-TEMP_FAILURE_RETRY-if-n.patch')
-rw-r--r--recipes-qt/qt5/qtwebengine/0004-chromium-musl-sandbox-Define-TEMP_FAILURE_RETRY-if-n.patch33
1 files changed, 33 insertions, 0 deletions
diff --git a/recipes-qt/qt5/qtwebengine/0004-chromium-musl-sandbox-Define-TEMP_FAILURE_RETRY-if-n.patch b/recipes-qt/qt5/qtwebengine/0004-chromium-musl-sandbox-Define-TEMP_FAILURE_RETRY-if-n.patch
new file mode 100644
index 00000000..68ffb6ce
--- /dev/null
+++ b/recipes-qt/qt5/qtwebengine/0004-chromium-musl-sandbox-Define-TEMP_FAILURE_RETRY-if-n.patch
@@ -0,0 +1,33 @@
1From 71b3c3d4160c5e98cc0a0797710bdd121a79e8b8 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 7 Jul 2017 14:01:12 -0700
4Subject: [PATCH] chromium: musl: sandbox: Define TEMP_FAILURE_RETRY if not
5 defined
6
7Musl does not define this Macro
8
9Signed-off-by: Khem Raj <raj.khem@gmail.com>
10---
11 chromium/sandbox/linux/suid/sandbox.c | 9 +++++++++
12 1 file changed, 9 insertions(+)
13
14diff --git a/chromium/sandbox/linux/suid/sandbox.c b/chromium/sandbox/linux/suid/sandbox.c
15index b655d1c79c..3de34e36f2 100644
16--- a/chromium/sandbox/linux/suid/sandbox.c
17+++ b/chromium/sandbox/linux/suid/sandbox.c
18@@ -44,6 +44,15 @@ static bool DropRoot();
19
20 #define HANDLE_EINTR(x) TEMP_FAILURE_RETRY(x)
21
22+#ifndef TEMP_FAILURE_RETRY
23+# define TEMP_FAILURE_RETRY(expression) \
24+ (__extension__ \
25+ ({ long int __result; \
26+ do __result = (long int) (expression); \
27+ while (__result == -1L && errno == EINTR); \
28+ __result; }))
29+#endif
30+
31 static void FatalError(const char* msg, ...)
32 __attribute__((noreturn, format(printf, 1, 2)));
33