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