From 45a918e37a8d2d5af99dc624f6ec1c795e774614 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 b588d123ad621..43b29e8417c47 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) {