<html>
<head>
<base href="https://bugs.freedesktop.org/">
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - include/GL/mesa_glinterop.h:62: error: redefinition of typedef ‘GLXContext’"
href="https://bugs.freedesktop.org/show_bug.cgi?id=96770#c2">Comment # 2</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - include/GL/mesa_glinterop.h:62: error: redefinition of typedef ‘GLXContext’"
href="https://bugs.freedesktop.org/show_bug.cgi?id=96770">bug 96770</a>
from <span class="vcard"><a class="email" href="mailto:vlee@freedesktop.org" title="Vinson Lee <vlee@freedesktop.org>"> <span class="fn">Vinson Lee</span></a>
</span></b>
<pre>(In reply to Emil Velikov from <a href="show_bug.cgi?id=96770#c1">comment #1</a>)
<span class="quote">> 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.</span >
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;</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
<li>You are the QA Contact for the bug.</li>
</ul>
</body>
</html>