From 6c7f39032fb15c9d33f7853137be0c6c2e307950 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Mon, 4 Aug 2025 17:41:33 +0200 Subject: [PATCH] glx: fix duplicate typedef ../glx/indirect_table.c In file included from ../glx/indirect_table.c:28: In file included from ../glx/glxserver.h:66: ../include/glx_extinit.h:33:28: warning: redefinition of typedef '__GLXscreen' is a C11 feature [-Wtypedef-redefinition] 33 | typedef struct __GLXscreen __GLXscreen; | ^ ../glx/glxscreens.h:113:28: note: previous definition is here 113 | typedef struct __GLXscreen __GLXscreen; | ^ Signed-off-by: Enrico Weigelt, metux IT consult --- glx/glxscreens.h | 4 ++-- include/glx_extinit.h | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/glx/glxscreens.h b/glx/glxscreens.h index 02170b0c62..c082c83247 100644 --- a/glx/glxscreens.h +++ b/glx/glxscreens.h @@ -35,10 +35,11 @@ * Silicon Graphics, Inc. */ +#include "include/glx_extinit.h" + #include "extension_string.h" #include "glxvndabi.h" -typedef struct __GLXconfig __GLXconfig; struct __GLXconfig { /* Management */ __GLXconfig *next; @@ -114,7 +115,6 @@ GLint glxConvertToXVisualType(int visualType); ** and DDX layers of the GLX server extension. The methods provide an ** interface for context management on a screen. */ -typedef struct __GLXscreen __GLXscreen; struct __GLXscreen { void (*destroy) (__GLXscreen * screen); diff --git a/include/glx_extinit.h b/include/glx_extinit.h index 07f3cc8558..14c3efd102 100644 --- a/include/glx_extinit.h +++ b/include/glx_extinit.h @@ -29,8 +29,11 @@ /* this is separate due to sdksyms pulling in extinit.h */ /* XXX this comment no longer makes sense i think */ #ifdef GLXEXT + typedef struct __GLXprovider __GLXprovider; typedef struct __GLXscreen __GLXscreen; +typedef struct __GLXconfig __GLXconfig; + struct __GLXprovider { __GLXscreen *(*screenProbe) (ScreenPtr pScreen); const char *name;