void-packages/srcpkgs/qv4l2/patches/musl-temp-failure-retry.patch

20 lines
669 B
Diff

--- a/lib/libdvbv5/dvb-dev-local.c
+++ b/lib/libdvbv5/dvb-dev-local.c
@@ -44,6 +44,16 @@
# define _(string) string
#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
+
struct dvb_dev_local_priv {
dvb_dev_change_t notify_dev_change;