From 96bdc156a1c42b884e54960dbdb64a5f0804dfc3 Mon Sep 17 00:00:00 2001 From: Olivier Fourdan Date: Tue, 7 May 2024 13:42:22 +0200 Subject: [PATCH] xwayland: Do not enable DRI3 without eventfd DRI3 version 1.4 which supports explicit buffers synchronization relies on the eventfd interface. As result, building would fail with DRI3 enabled on platforms without the eventfd interface. Check for the availability of the sys/eventfd.h header and disable DRI3 support if missing. Signed-off-by: Olivier Fourdan Part-of: --- meson.build | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index ada548a2d..85627e3a6 100644 --- a/meson.build +++ b/meson.build @@ -505,14 +505,18 @@ else build_dri2 = get_option('dri2') == 'true' endif +have_eventfd = cc.has_header('sys/eventfd.h') if get_option('dri3') == 'auto' - build_dri3 = dri3proto_dep.found() and xshmfence_dep.found() and libdrm_dep.found() + build_dri3 = dri3proto_dep.found() and xshmfence_dep.found() and libdrm_dep.found() and have_eventfd else build_dri3 = get_option('dri3') == 'true' if build_dri3 if not xshmfence_dep.found() error('DRI3 requested, but xshmfence not found') endif + if not have_eventfd + error('DRI3 requested, but sys/eventfd.h not found') + endif endif endif