From e4cd0834494210dda0cd545bc48c1e34f2b7463d Mon Sep 17 00:00:00 2001 From: Sergey Fedorov Date: Sat, 1 Aug 2026 06:01:19 +0000 Subject: [PATCH] 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 Signed-off-by: Sergey Fedorov --- 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 1cafd28836..c16467ecc9 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"