pmaports/maemo/profiled/profiled-fix-musl.patch
NotKit 13465a27c6 Initial packaging for Maemo UI (#461)
* Initial packaging for Maemo UI from https://github.com/fremantle-gtk2/

gtk+2.0-maemo package is based on https://pkgs.alpinelinux.org/package/edge/main/x86/gtk+2.0 by Natanael Copa

* Include git revision in tarball filename
2017-09-04 17:09:53 +00:00

21 lines
711 B
Diff

diff --git a/profiled_config.h b/profiled_config.h
index 931aa9e..b4df46f 100644
--- a/profiled_config.h
+++ b/profiled_config.h
@@ -42,6 +42,16 @@ extern "C" {
} /* fool JED indentation ... */
#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
+
#ifdef __cplusplus
};
#endif