0001-Fix-musl-compilation-by-adding-TEMP_FAILURE_RETRY.patch 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  1. From 645c45f0334bb1d6e31b5927cece5e446f129cbb Mon Sep 17 00:00:00 2001
  2. From: Danilo Spinella <danyspin97@protonmail.com>
  3. Date: Sat, 7 Dec 2019 00:05:21 +0100
  4. Subject: [PATCH] Fix musl compilation by adding TEMP_FAILURE_RETRY
  5. Fetch from: https://github.com/flatpak/xdg-dbus-proxy/pull/13
  6. Upstream-Status: Accepted
  7. Signed-off-by: Adrian Perez de Castro <aperez@igalia.com>
  8. ---
  9. dbus-proxy.c | 9 +++++++++
  10. 1 file changed, 9 insertions(+)
  11. diff --git a/dbus-proxy.c b/dbus-proxy.c
  12. index 163df21..4b07931 100644
  13. --- a/dbus-proxy.c
  14. +++ b/dbus-proxy.c
  15. @@ -30,6 +30,15 @@
  16. #include <errno.h>
  17. #include "flatpak-proxy.h"
  18. +// Taken from glibc unistd.h
  19. +#ifndef TEMP_FAILURE_RETRY
  20. +# define TEMP_FAILURE_RETRY(expression) \
  21. + (__extension__ \
  22. + ({ long int __result; \
  23. + do __result = (long int) (expression); \
  24. + while (__result == -1L && errno == EINTR); \
  25. + __result; }))
  26. +#endif
  27. static const char *argv0;
  28. static GList *proxies;
  29. --
  30. 2.24.1