void-packages/srcpkgs/v4l-utils/patches/musl.patch
maxice8 8b856396d3 v4l-utils: update to 1.14.2.
Closes: #11570 [via git-merge-pr]
2018-03-17 23:36:13 -07:00

46 lines
1.7 KiB
Diff

--- utils/ir-ctl/ir-ctl.c.orig 2017-01-25 17:27:44.373665101 +0000
+++ utils/ir-ctl/ir-ctl.c 2017-01-25 17:27:51.052665445 +0000
@@ -44,6 +44,24 @@
# define N_(string) string
+#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
+
+#ifndef strndupa
+#define strndupa(s, n) \
+ (__extension__ ({const char *__in = (s); \
+ size_t __len = strnlen (__in, (n)) + 1; \
+ char *__out = (char *) alloca (__len); \
+ __out[__len-1] = '\0'; \
+ (char *) memcpy (__out, __in, __len-1);}))
+#endif
+
/* See drivers/media/rc/ir-lirc-codec.c line 23 */
#define LIRCBUF_SIZE 512
--- lib/libdvbv5/dvb-dev-local.c
+++ lib/libdvbv5/dvb-dev-local.c
@@ -60,6 +60,16 @@ struct dvb_dev_local_priv {
void *user_priv;
};
+/* 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 int handle_device_change(struct dvb_device_priv *dvb,
struct udev_device *dev,
const char *syspath,