From cab385690370008656fb348e8fd9d774dfef751b Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Fri, 28 Feb 2025 15:15:14 +0100 Subject: [PATCH] xfree86: os-support: fix FTBS when no recent enough libdrm found On Linux, the only supported platform bus backend (*1) is via DRM/DRI. Trying to build it w/o (recent enough) libdrm fails as it tries to compile the drm-based implementation, w/o having drm.h available. (*2) In order to fix this, we need to compile noop-implementation instead. *1) platform specific code for detecting video devices *2) https://gitlab.freedesktop.org/xorg/xserver/-/issues/1771 Issue: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1771 Signed-off-by: Enrico Weigelt, metux IT consult Part-of: --- hw/xfree86/os-support/meson.build | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/hw/xfree86/os-support/meson.build b/hw/xfree86/os-support/meson.build index de392572a..c312162f3 100644 --- a/hw/xfree86/os-support/meson.build +++ b/hw/xfree86/os-support/meson.build @@ -36,8 +36,12 @@ if host_machine.system() == 'linux' 'linux/lnx_video.c', 'misc/SlowBcopy.c', 'shared/VTsw_usl.c', - 'shared/drm_platform.c', ] + if libdrm_dep.found() + srcs_xorg_os_support += 'shared/drm_platform.c' + else + srcs_xorg_os_support += 'shared/platform_noop.c' + endif if build_agp srcs_xorg_os_support += 'linux/lnx_agp.c' else