From e114a443bb7d9ce6f0fa752971c0fe222bfdbc05 Mon Sep 17 00:00:00 2001 From: Sergey Fedorov Date: Sat, 1 Aug 2026 06:01:19 +0000 Subject: [PATCH 1/2] xquartz/GL: sanitize QuickDraw WindowPtr in capabilities.c capabilities.c includes , which pulls in QuickDraw's WindowPtr, and then includes "os.h". Since commit 976e6cd ("include: new header for fundamental pointer types") os.h pulls in xlibre_ptrtypes.h, which defines the X server's own WindowPtr, so the two now conflict: error: conflicting types for 'WindowPtr'; have 'struct _Window *' The file already renames Cursor and BOOL out of the way around the Apple headers; do the same for WindowPtr and Picture, matching the pattern in sanitizedCarbon.h. Fixes: https://github.com/X11Libre/xserver/issues/3461 --- hw/xquartz/GL/capabilities.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/hw/xquartz/GL/capabilities.c b/hw/xquartz/GL/capabilities.c index 1cafd2883..c16467ecc 100644 --- a/hw/xquartz/GL/capabilities.c +++ b/hw/xquartz/GL/capabilities.c @@ -26,8 +26,13 @@ #include #include -#define Cursor Mac_Cursor -#define BOOL Mac_BOOL +/* QuickDraw in ApplicationServices conflicts with the basic X server headers + * (e.g. WindowPtr, now pulled in transitively via os.h -> xlibre_ptrtypes.h). + * Rename the QuickDraw symbols out of the way, matching sanitizedCarbon.h. */ +#define Cursor Mac_Cursor +#define BOOL Mac_BOOL +#define WindowPtr QD_WindowPtr +#define Picture QD_Picture #include #include #include @@ -35,6 +40,8 @@ #include #undef Cursor #undef BOOL +#undef WindowPtr +#undef Picture #include "capabilities.h" -- 2.43.0