From ee52ba51114ad353a1427ad5487ad989c09e6bd0 Mon Sep 17 00:00:00 2001 From: Tobias Klausmann Date: Sun, 22 Sep 2019 13:28:26 +0200 Subject: [PATCH] eglplatform: fix mesa specific defines The XServer fails to build with In file included from /usr/include/EGL/eglplatform.h:122, from /usr/include/epoxy/egl_generated.h:11, from /usr/include/epoxy/egl.h:46, from glamor_priv.h:43, from glamor_copy.c:23: /usr/include/X11/Xlib.h:222:2: error: conflicting types for 'GC' 222 | *GC; | ^~ In file included from glamor.h:34, from glamor_priv.h:32, from glamor_copy.c:23: ../include/gcstruct.h:282:3: note: previous declaration of 'GC' was here 282 | } GC; Add the mesa specific defines to eglplatform, to let it build again. Signed-off-by: Tobias Klausmann --- include/EGL/eglplatform.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/include/EGL/eglplatform.h b/include/EGL/eglplatform.h index 29ab288..dd38452 100644 --- a/include/EGL/eglplatform.h +++ b/include/EGL/eglplatform.h @@ -118,6 +118,14 @@ typedef intptr_t EGLNativeWindowType; #elif defined(__unix__) || defined(USE_X11) +#if defined(MESA_EGL_NO_X11_HEADERS) + +typedef void *EGLNativeDisplayType; +typedef khronos_uintptr_t EGLNativePixmapType; +typedef khronos_uintptr_t EGLNativeWindowType; + +#else + /* X11 (tentative) */ #include #include @@ -126,6 +134,8 @@ typedef Display *EGLNativeDisplayType; typedef Pixmap EGLNativePixmapType; typedef Window EGLNativeWindowType; +#endif /* MESA_EGL_NO_X11_HEADERS */ + #elif defined(__APPLE__) typedef int EGLNativeDisplayType; -- 2.23.0