From 4d88af2228c8d70ded3e887df1f7fa0b290b2e3a 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 (cherry picked from commit 96bdc156a1c42b884e54960dbdb64a5f0804dfc3) Part-of: --- meson.build | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 05d96a73a..4743d63e1 100644 --- a/meson.build +++ b/meson.build @@ -332,14 +332,18 @@ endif libdrm_dep = dependency('libdrm', version: libdrm_req, required: false) +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