From 627548f95e80a45e99dece1880d83b36eb6041e3 Mon Sep 17 00:00:00 2001 From: Dudemanguy Date: Wed, 16 Oct 2024 16:14:04 -0500 Subject: [PATCH] wayland: guard devices_are_equal completely Only used if we have drm. Avoids a -Wunused-function error. --- video/out/wayland_common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/video/out/wayland_common.c b/video/out/wayland_common.c index a05e03d01624c..810d68a8cb396 100644 --- a/video/out/wayland_common.c +++ b/video/out/wayland_common.c @@ -1985,18 +1985,18 @@ static void add_feedback(struct vo_wayland_feedback_pool *fback_pool, } } +#if HAVE_DRM static bool devices_are_equal(dev_t a, dev_t b) { bool ret = false; -#if HAVE_DRM drmDevice *deviceA, *deviceB; if (!drmGetDeviceFromDevId(a, 0, &deviceA) && !drmGetDeviceFromDevId(b, 0, &deviceB)) ret = drmDevicesEqual(deviceA, deviceB); drmFreeDevice(&deviceA); drmFreeDevice(&deviceB); -#endif return ret; } +#endif static void do_minimize(struct vo_wayland_state *wl) {