All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1] libdvbv5: add optional copy of TEMP_FAILURE_RETRY macro (fix musl compile)
@ 2018-03-04  8:42 Peter Seiderer
  0 siblings, 0 replies; only message in thread
From: Peter Seiderer @ 2018-03-04  8:42 UTC (permalink / raw)
  To: linux-media

Fixes:

  ../../lib/libdvbv5/.libs/libdvbv5.so: undefined reference to `TEMP_FAILURE_RETRY'

Signed-off-by: Peter Seiderer <ps.report@gmx.net>
---
 lib/libdvbv5/dvb-dev-local.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/lib/libdvbv5/dvb-dev-local.c b/lib/libdvbv5/dvb-dev-local.c
index 8bc99d1..7a76d65 100644
--- a/lib/libdvbv5/dvb-dev-local.c
+++ b/lib/libdvbv5/dvb-dev-local.c
@@ -44,6 +44,15 @@
 # define _(string) string
 #endif
 
+/* taken from glibc unistd.h */
+#ifndef TEMP_FAILURE_RETRY
+#define TEMP_FAILURE_RETRY(expression) \
+    ({ 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;
 
-- 
2.16.2

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2018-03-04  8:42 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-04  8:42 [PATCH v1] libdvbv5: add optional copy of TEMP_FAILURE_RETRY macro (fix musl compile) Peter Seiderer

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.