summaryrefslogtreecommitdiffstats
path: root/src/glx/x11
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2009-01-18 09:59:07 -0700
committerBrian Paul <[email protected]>2009-01-18 10:00:34 -0700
commitb7f802eca2c78397ea7b8472b3a7e90a997fc140 (patch)
treeb7e3b93e23a6c81634429af75eaedc447fd0050f /src/glx/x11
parenta61a1a8181f05e07de1c0bccad109f4ad529a298 (diff)
glx: gcc 2.95 build fix (move declaration before code)
Adapted from patch by Matthieu Herbb <[email protected]>
Diffstat (limited to 'src/glx/x11')
-rw-r--r--src/glx/x11/glxcmds.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/glx/x11/glxcmds.c b/src/glx/x11/glxcmds.c
index 1d373ed29d8..c68b6ac4efe 100644
--- a/src/glx/x11/glxcmds.c
+++ b/src/glx/x11/glxcmds.c
@@ -864,6 +864,12 @@ PUBLIC void glXSwapBuffers(Display *dpy, GLXDrawable drawable)
GLXContext gc;
GLXContextTag tag;
CARD8 opcode;
+#ifdef USE_XCB
+ xcb_connection_t *c;
+#else
+ xGLXSwapBuffersReq *req;
+#endif
+
#ifdef GLX_DIRECT_RENDERING
__GLXDRIdrawable *pdraw = GetGLXDRIDrawable(dpy, drawable, NULL);
@@ -892,12 +898,10 @@ PUBLIC void glXSwapBuffers(Display *dpy, GLXDrawable drawable)
}
#ifdef USE_XCB
- xcb_connection_t* c = XGetXCBConnection(dpy);
+ c = XGetXCBConnection(dpy);
xcb_glx_swap_buffers(c, tag, drawable);
xcb_flush(c);
#else
- xGLXSwapBuffersReq *req;
-
/* Send the glXSwapBuffers request */
LockDisplay(dpy);
GetReq(GLXSwapBuffers,req);