void-packages/srcpkgs/bubblewrap/patches/fix-TEMP_FAILTURE_RETRY-mus...

20 lines
737 B
Diff

--- bubblewrap.c
+++ bubblewrap.c
@@ -42,6 +42,16 @@
#define CLONE_NEWCGROUP 0x02000000 /* New cgroup namespace */
#endif
+/* taken from glibc unistd.h and fixes musl */
+#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
+
/* Globals to avoid having to use getuid(), since the uid/gid changes during runtime */
static uid_t real_uid;
static gid_t real_gid;