From 5c4bc3e462c6e6293b4c34398674edcd7f32e0cd 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: (cherry picked from commit 96bdc156a1c42b884e54960dbdb64a5f0804dfc3) --- meson.build | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 6971bd4e3a..a863b680ca 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