aboutsummaryrefslogtreecommitdiffstats
path: root/community/xdg-dbus-proxy/musl-fix.patch
blob: 3e18d1b6d751235fbc4de7d566ac872d3e210a8b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
https://github.com/flatpak/flatpak/issues/618
diff --git a/dbus-proxy.c b/dbus-proxy.c
index 163df21..99090e1 100644
--- a/dbus-proxy.c
+++ b/dbus-proxy.c
@@ -31,6 +31,16 @@
 
 #include "flatpak-proxy.h"
 
+/* 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
+
 static const char *argv0;
 static GList *proxies;
 static int sync_fd = -1;