The following patch (full version at the end) commit cb8e15a64307e580123b459e4c5964dc7b0d73d9 Author: Huw D. M. Davies <huw(a)codeweavers.com> Date: Tue Dec 22 14:26:36 2020 +0000 qcap: Avoid unused variable warning if v4l is absent. broke builds of Wine 5.0.4 where v4l is not present, specifically when the header <linux/videodev2.h> is not available. Configuring with --without-v4l2 does not trigger this; it really is about the presence of the header. The failure mode is In file included from v4l.c:60: v4l.c: In function 'qcap_driver_destroy': ../../include/wine/debug.h:485:56: error: '__wine_dbch___default' undeclared (first use in this function) : v4l.c:602:5: note: in expansion of macro 'ERR' 602 | ERR("v4l absent: shouldn't be called\n"); \ | ^~~ v4l.c:607:5: note: in expansion of macro 'FAIL_WITH_ERR' 607 | FAIL_WITH_ERR; | ^~~~~~~~~~~~~ and the straightforward fix is simply reverting this patch. https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=254601 has more details. Gerald commit cb8e15a64307e580123b459e4c5964dc7b0d73d9 jAuthor: Huw D. M. Davies <huw(a)codeweavers.com> Date: Tue Dec 22 14:26:36 2020 +0000 qcap: Avoid unused variable warning if v4l is absent. Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit 73281bf132e1dad9aebf3410b21616727438fb63) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> diff --git a/dlls/qcap/v4l.c b/dlls/qcap/v4l.c index 0d7e176d3da..e548000187f 100644 --- a/dlls/qcap/v4l.c +++ b/dlls/qcap/v4l.c @@ -63,10 +63,9 @@ #include "qcap_main.h" #include "capture.h" -WINE_DEFAULT_DEBUG_CHANNEL(qcap); - #ifdef HAVE_LINUX_VIDEODEV2_H +WINE_DEFAULT_DEBUG_CHANNEL(qcap); WINE_DECLARE_DEBUG_CHANNEL(winediag); static typeof(open) *video_open = open;