1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-23 19:25:25 +03:00
aports/testing/bazel3/patch_TEMP_FAILURE_RETRY.patch
2020-12-31 17:53:12 +00:00

20 lines
807 B
Diff

--- a/src/main/tools/linux-sandbox-pid1.cc.old
+++ b/src/main/tools/linux-sandbox-pid1.cc
@@ -54,6 +54,17 @@
#include "src/main/tools/logging.h"
#include "src/main/tools/process-tools.h"
+// TEPM_FAILURE_RETRY is glibc specific and is not available on e.g. musl
+// Taken from glibc unistd.h
+#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 int global_child_pid;
static void SetupSelfDestruction(int *sync_pipe) {