glx/tests: Provide __glXGetCurrentContext() stub when needed
authorJon TURNEY <jon.turney@dronecode.org.uk>
Tue, 12 Nov 2013 22:54:35 +0000 (22:54 +0000)
committerJon TURNEY <jon.turney@dronecode.org.uk>
Tue, 19 Nov 2013 15:28:22 +0000 (15:28 +0000)
Refine 8c533022.  Provide a stub __glXGetCurrentContext() function when
$(DEFINES) are such that it is not a macro.

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
src/glx/tests/fake_glx_screen.cpp

index 815330a0b1f23ec5a5f967b49b45d725d3aa9271..ccb1afae47d5a3afa974b6b9fc455e12f14dcd68 100644 (file)
@@ -76,3 +76,11 @@ indirect_create_context_attribs(struct glx_screen *base,
 }
 
 __thread void *__glX_tls_Context = NULL;
+
+#if defined(HAVE_PTHREAD) && !defined(GLX_USE_TLS)
+extern "C" struct glx_context *
+__glXGetCurrentContext()
+{
+ return (struct glx_context *) __glX_tls_Context;
+}
+#endif