From a5e01866ae17454252101a7f60b8042eab028b9d Mon Sep 17 00:00:00 2001 From: Robert Mader Date: Wed, 21 Jan 2026 10:08:53 +0100 Subject: [PATCH] egl: Add workaround for Mesa <= 22.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Older Mesa versions with EGL headers missing the change from https://github.com/KhronosGroup/EGL-Registry/pull/130 pull in Xlib headers, causing build issues. This notably happens on the Debian 11 CI image, which until now does not build the shared EGL code due to missing GBM dependencies. That will change in the following commit, thus include a workaround. Suggested-by: Barnabás Pőcze Signed-off-by: Robert Mader Reviewed-by: Laurent Pinchart Signed-off-by: Kieran Bingham --- include/libcamera/internal/egl.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/libcamera/internal/egl.h b/include/libcamera/internal/egl.h index 630345ea..8a2d96d7 100644 --- a/include/libcamera/internal/egl.h +++ b/include/libcamera/internal/egl.h @@ -16,6 +16,12 @@ #include #include +/* + * Workaround for build issues on Mesa <= 22.2, see + * https://github.com/KhronosGroup/EGL-Registry/pull/130 + */ +#define EGL_NO_X11 + #define EGL_EGLEXT_PROTOTYPES #include #include