summaryrefslogtreecommitdiffstats
path: root/src/glx/x11/glxext.c
diff options
context:
space:
mode:
authorKeith Whitwell <[email protected]>2010-02-04 12:46:21 +0000
committerKeith Whitwell <[email protected]>2010-02-08 13:05:35 +0000
commit01923fb72d755b319dde521c3c81a20caa95b540 (patch)
tree3ae61e1d3dd0a14a12ce187ae74d3e653b101db3 /src/glx/x11/glxext.c
parente891a9cc3acb6d1d7d3cd994b375d15a2a3c552f (diff)
glx: permit building with older protocol headers
I'd like to be able to build mesa on current distro releases without having to upgrade from the standard dri2proto and glproto headers. With this change I'm able to build on ancient releases such as Ubuntu 9-10... In general, it would be nice to be able to build-test mesa to check for unintended breakages without having to follow the external dependencies of every group working on the codebase. Seems to introduce no changes to the build of libglapi.a when tested against new versions of the headers.
Diffstat (limited to 'src/glx/x11/glxext.c')
-rw-r--r--src/glx/x11/glxext.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/glx/x11/glxext.c b/src/glx/x11/glxext.c
index 1b4ab716828..dde694b9f8b 100644
--- a/src/glx/x11/glxext.c
+++ b/src/glx/x11/glxext.c
@@ -158,6 +158,16 @@ __glXWireToEvent(Display *dpy, XEvent *event, xEvent *wire)
aevent->count = awire->count;
return True;
}
+ /* No easy symbol to test for this, as GLX_BufferSwapComplete is
+ * defined in the local glx.h header, but the
+ * xGLXBufferSwapComplete typedef is only available in new versions
+ * of the external glxproto.h header, which doesn't have any
+ * testable versioning define.
+ *
+ * I'll use the related DRI2 define, in the hope that we won't
+ * receive these events unless we know how to ask for them:
+ */
+#ifdef X_DRI2SwapBuffers
case GLX_BufferSwapComplete:
{
GLXBufferSwapComplete *aevent = (GLXBufferSwapComplete *)event;
@@ -169,6 +179,7 @@ __glXWireToEvent(Display *dpy, XEvent *event, xEvent *wire)
aevent->sbc = ((CARD64)awire->sbc_hi << 32) | awire->sbc_lo;
return True;
}
+#endif
default:
/* client doesn't support server event */
break;