From 29ee4eee23b42bab09da68d40d3424506bc6819f Mon Sep 17 00:00:00 2001 From: Sergey Fedorov Date: Sat, 1 Aug 2026 06:01:19 +0000 Subject: [PATCH 2/2] xquartz/GL: include xpr_dri.h instead of dri.h indirect.c and visualConfigs.c #include "dri.h" to get XQuartz's own DRI surface API (DRICreateSurface, DRISurfaceNotifyArg, ...). That header used to live at hw/xquartz/xpr/dri.h and was resolved via the ../xpr include path. Commit 9bd146a39 ("xfree86: dri: move over public SDK headers to include/") renamed it to xpr_dri.h, so "dri.h" now falls through to the generic include/dri.h, which unconditionally includes the Linux-only and xf86dri.h and breaks the macOS build: fatal error: pciaccess.h: No such file or directory fatal error: xf86dri.h: No such file or directory Include the new name explicitly. Fixes: https://github.com/X11Libre/xserver/issues/3462 --- hw/xquartz/GL/indirect.c | 8 +++++++- hw/xquartz/GL/visualConfigs.c | 5 ++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/hw/xquartz/GL/indirect.c b/hw/xquartz/GL/indirect.c index 6b45d1a6f..810c106b2 100644 --- a/hw/xquartz/GL/indirect.c +++ b/hw/xquartz/GL/indirect.c @@ -48,7 +48,13 @@ #include "x-hash.h" #include "visualConfigs.h" -#include "dri.h" +/* This is XQuartz's own DRI surface API (hw/xquartz/xpr/xpr_dri.h), not the + * generic xfree86 include/dri.h. It was renamed from dri.h to xpr_dri.h in + * 9bd146a39 ("xfree86: dri: move over public SDK headers to include/"); before + * that, "dri.h" resolved to ../xpr/dri.h. Include the new name explicitly so + * we don't fall through to include/dri.h, which pulls in Linux-only + * and xf86dri.h. */ +#include "xpr_dri.h" #include "darwin.h" #define GLAQUA_DEBUG_MSG(msg, args ...) ASL_LOG(ASL_LEVEL_DEBUG, "GLXAqua", \ diff --git a/hw/xquartz/GL/visualConfigs.c b/hw/xquartz/GL/visualConfigs.c index 3d134df53..0d635a072 100644 --- a/hw/xquartz/GL/visualConfigs.c +++ b/hw/xquartz/GL/visualConfigs.c @@ -31,7 +31,10 @@ #include #include -#include "dri.h" +/* XQuartz's own DRI header (hw/xquartz/xpr/xpr_dri.h), renamed from dri.h in + * 9bd146a39; use the new name so we don't fall through to the generic + * include/dri.h, which pulls in Linux-only and xf86dri.h. */ +#include "xpr_dri.h" #include #include -- 2.43.0