[PATCH 1/1] avicap32: Add fallback Unixlib function and thunk to use when V4L is unavailable.

Brendan Shanks wine at gitlab.winehq.org
Tue May 31 19:21:34 CDT 2022


From: Brendan Shanks <bshanks at codeweavers.com>

Signed-off-by: Brendan Shanks <bshanks at codeweavers.com>
---
 dlls/avicap32/v4l.c | 26 ++++++++++++++++++++++++--
 1 file changed, 24 insertions(+), 2 deletions(-)

diff --git a/dlls/avicap32/v4l.c b/dlls/avicap32/v4l.c
index 4f3a162c838..792aa5732f6 100644
--- a/dlls/avicap32/v4l.c
+++ b/dlls/avicap32/v4l.c
@@ -42,10 +42,10 @@
 
 #include "unixlib.h"
 
-#ifdef HAVE_LINUX_VIDEODEV2_H
-
 WINE_DEFAULT_DEBUG_CHANNEL(avicap);
 
+#ifdef HAVE_LINUX_VIDEODEV2_H
+
 static int xioctl(int fd, int request, void *arg)
 {
     int ret;
@@ -139,4 +139,26 @@ const unixlib_entry_t __wine_unix_call_wow64_funcs[] =
 
 #endif  /* _WIN64 */
 
+#else  /* HAVE_LINUX_VIDEODEV2_H */
+
+static NTSTATUS get_device_desc(void *args)
+{
+    ERR("Video4Linux support not enabled\n");
+    return STATUS_UNSUCCESSFUL;
+}
+
+const unixlib_entry_t __wine_unix_call_funcs[] =
+{
+    get_device_desc,
+};
+
+#ifdef _WIN64
+
+const unixlib_entry_t __wine_unix_call_wow64_funcs[] =
+{
+    get_device_desc,
+};
+
+#endif  /* _WIN64 */
+
 #endif /* HAVE_LINUX_VIDEODEV2_H */
-- 
GitLab

https://gitlab.winehq.org/wine/wine/-/merge_requests/163



More information about the wine-devel mailing list