From patchwork Wed Oct 14 16:48:59 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Joel Winarske X-Patchwork-Id: 28452 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id A0627BDCB6 for ; Wed, 14 Oct 2026 16:49:35 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 99CCC68DEC; Wed, 14 Oct 2026 18:49:34 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="IeWCj9Pg"; dkim-atps=neutral Received: from mail-pg1-x52d.google.com (mail-pg1-x52d.google.com [IPv6:2607:f8b0:4864:20::52d]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 56FEC689BE for ; Wed, 14 Oct 2026 18:49:32 +0200 (CEST) Received: by mail-pg1-x52d.google.com with SMTP id 41be03b00d2f7-ccce6d9abfeso2487174a12.1 for ; Wed, 14 Oct 2026 09:49:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1791996570; x=1792601370; darn=lists.libcamera.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to:content-type; bh=tmdsYOMoyAQZsu4XZzsyLlRRwE48T1q+XrCQXiCDLyA=; b=IeWCj9PgWpbZpjy3dbp4r2QAEoP/cgVZykLjY3pZ9a0Ejv2qALk+NbT0jtZgcnznHe U2qTDELvv1WTrJkxaw1hR8b2OqJ1kQpqMLfcNwMIci47xcSKv3wdRHsvpcgLQHWNSfe1 gOeyiurEq7IKZVuIDbNqT1ReIteHMNlozSHUY0XWXnrtO5ZlGhwUoegMvUx9/a+wrMNc Ori0arhwUJd5avv6hrXunN102TRSL3mSGySJ1UoUFGlrHkXtco+kwu/EiOTUMV0UvrPO NscAxI2BJ+IbvyYHl5Gjqg20BQuG7iszs9FhhTa1ryPqL1SpkbpoAIujrUFUJ99I5pK8 H4/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1791996570; x=1792601370; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=tmdsYOMoyAQZsu4XZzsyLlRRwE48T1q+XrCQXiCDLyA=; b=RHIsmYT6V73SQs6eRgV3Nb9d6k3Bl5PEMPhaa7pnEB6S2nyLc7B5UtP/lKZZK1cBpq Q/qKfQpoyFIbp5Ocit2tGlJF7YKoFMzphJOmtdhFXkzyxCmkjGTSYuOkK+OCJh2/CBHE mEiK33tj0yApvbQeKmlrTqVcNrlaVgfy2QO36dgYKOgyGXEpxQPmmQkG0HIwbeH5oLPt 4nPQt54eulwmWbW6ghgPta+bWMKJ8GsiWynIGg/M5lFKimg7JYFhpeyBwx26TKKJd0t2 mSy9vnYuscAIHctPXU3iJt1id8CKq2XXNkDOvujxboh8Biw6lk6gFE7Rtr7z5haXihXI OrNQ== X-Gm-Message-State: AFq9FYLvIMJuFz0y2zJpHnhGc9t9TYG4lo6ZfiqLnjLdfnOUdJ3S8nti TiwRAxgmU/u6Amwl/h9+4SFvnbULdShv2rdwmWUjo5xEA889Srf1rCxqj5+JWA== X-Gm-Gg: AYBFou0Nfqa/LOu+CfrVvjBfZ/oWhix3s5uAeiXwF7u3G3ockQ+YYOtWqkuou0u4Fvv /JJlA4WGK+cnMSfaDffZkD1FUEAgBBHEO9CAd5HdlHL/HdNKTWJGPAp1GaoHnacOHc6zuwMXVgJ 2WMkThMNH8oN2oVZ8S4diMYEPf5esHuLEIc2wuo41jOgti+LdjHeTptXC2yeHirxb6vjdKyGxrV In2Bw9LQ2FMcZr9BTjzrLnT6dCgI5Sctszoqstz6u7n5jdQluPGfA/hZqN/sSKmnDbCtRuhUYMc An59F3JKzuwqBrnwzEuslyrJV1rc3qfwM9cxJyQSIYhnwwZfGM1tLcFRVQy6m+K+DFpj0CYlt4x qJtz24VGGgRow5P24M6F3JzrFIHLPdf94oN2rPOHpLqsrliXTCDQsadzzW5ocqywfGDDDJKp4hr hqStXm4WlSxOxyej9up4oBb7kBL/z25ZsoFafAbAzgDZNAklafzFdGfEDmyGAPrvRQ+MnQtPKpJ GPqGgSIviF+W+3UnFhcEzElQooH8ELEaqxZOX/Leb1+Yj8tY/M2xU3++yk= X-Received: by 2002:a17:90b:4b82:b0:3ac:95d7:2f9e with SMTP id 98e67ed59e1d1-3ac95d73221mr53890a91.38.1791996570218; Wed, 14 Oct 2026 09:49:30 -0700 (PDT) Received: from air ([2601:602:580:a250:62eb:81a:51d8:6bf6]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3ac9474b52fsm221178a91.9.2026.10.14.09.49.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Oct 2026 09:49:29 -0700 (PDT) From: Joel Winarske X-Google-Original-From: Joel Winarske To: libcamera-devel@lists.libcamera.org Cc: Joel Winarske , Kieran Bingham , =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= Subject: [PATCH v2] libcamera: egl: Don't redefine EGL_NO_X11 Date: Wed, 14 Oct 2026 09:48:59 -0700 Message-ID: <20261014164859.820451-1-joel.winarske@linux.com> X-Mailer: git-send-email 2.56.0 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Mesa built without the X11 platform exports -DEGL_NO_X11 via egl.pc Cflags, from mesa!2226 (19.3) until mesa!18848 (22.3) moved Xlib inclusion behind USE_X11. This affects non-glvnd builds, where egl.pc comes from Mesa rather than libglvnd, e.g. the PowerVR mesa-pvr (22.1) used on StarFive JH7110. The -D defines the macro as 1, so the unconditional empty define in egl.h is a redefinition, which is an error with -Werror: include/libcamera/internal/egl.h:23:9: error: 'EGL_NO_X11' redefined [-Werror] The define is still needed for EGL headers predating KhronosGroup/EGL-Registry#130, which otherwise pull in Xlib.h, so only define it when it isn't already set. Signed-off-by: Joel Winarske Reviewed-by: Kieran Bingham Reviewed-by: Barnabás Pőcze --- Changes in v2: - Expand commit message: Mesa versions/MRs, non-glvnd, why the define is kept - Collect Reviewed-by tags include/libcamera/internal/egl.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/libcamera/internal/egl.h b/include/libcamera/internal/egl.h index 7d062b32d..9d2c9b5bc 100644 --- a/include/libcamera/internal/egl.h +++ b/include/libcamera/internal/egl.h @@ -21,7 +21,9 @@ * Workaround for build issues on Mesa <= 22.2, see * https://github.com/KhronosGroup/EGL-Registry/pull/130 */ +#ifndef EGL_NO_X11 #define EGL_NO_X11 +#endif #define EGL_EGLEXT_PROTOTYPES #include