[Mesa-dev] [Bug 96770] include/GL/mesa_glinterop.h:62: error: redefinition of typedef ‘GLXContext’
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Tue Sep 6 19:15:55 UTC 2016
https://bugs.freedesktop.org/show_bug.cgi?id=96770
--- Comment #2 from Vinson Lee <vlee at freedesktop.org> ---
(In reply to Emil Velikov from comment #1)
> Yay, I broke things ;-)
>
> There's a couple of routes we can take:
> - Bring back the EGL/GLX includes - I would strongly advice against that.
> - guard the typedefs with ifdef macros - fragile, we'll also need to ensure
> that the header is included after the EGL/GLX ones.
> - opencode/replaces the existing typedefs with the respective original
> types - a tad nasty, yet it seems like the better option.
> - other ?
>
> Vinson, let me know which one you'd prefer and I'll whip a patch... Unless
> you beat me to it.
Emil, I don't have a preference but I tested that undoing the changes in
8472045b16b3e4621553fe451a20a9ba9f0d44b6 fixes the build.
diff --git a/include/GL/mesa_glinterop.h b/include/GL/mesa_glinterop.h
index 383d7f9..c6a967e 100644
--- a/include/GL/mesa_glinterop.h
+++ b/include/GL/mesa_glinterop.h
@@ -52,15 +52,12 @@
#include <stddef.h>
#include <stdint.h>
+#include <GL/glx.h>
#ifdef __cplusplus
extern "C" {
#endif
-/* Forward declarations to avoid inclusion of GL/glx.h */
-typedef struct _XDisplay Display;
-typedef struct __GLXcontextRec *GLXContext;
-
/* Forward declarations to avoid inclusion of EGL/egl.h */
typedef void *EGLDisplay;
typedef void *EGLContext;
--
You are receiving this mail because:
You are the assignee for the bug.
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20160906/cc5e442f/attachment.html>
More information about the mesa-dev
mailing list