ports/multimedia/libv4l/patches/patch-lib_libv4l2_libv4l2_c

17 lines
335 B
Text

Avoid syscall(2) usage
Index: lib/libv4l2/libv4l2.c
--- lib/libv4l2/libv4l2.c.orig
+++ lib/libv4l2/libv4l2.c
@@ -880,7 +880,11 @@ int v4l2_dup(int fd)
int index = v4l2_get_index(fd);
if (index == -1)
+#ifdef CONFIG_SYS_WRAPPER
+ return dup(fd);
+#else
return syscall(SYS_dup, fd);
+#endif
devices[index].open_count++;