diff options
Diffstat (limited to 'chromium/patches/027-temp-failure-retry.patch')
| -rw-r--r-- | chromium/patches/027-temp-failure-retry.patch | 22 |
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 @@ | |||
| 1 | random glibc macro, not provided by musl. | ||
| 2 | https://www.gnu.org/software/libc/manual/html_node/Interrupted-Primitives.html | ||
| 3 | diff --git a/sandbox/linux/suid/process_util.h b/sandbox/linux/suid/process_util.h | ||
| 4 | index 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. | ||