summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJon TURNEY <[email protected]>2013-11-12 22:54:35 +0000
committerJon TURNEY <[email protected]>2013-11-19 15:28:22 +0000
commit5ab59e5332215f149b532436c4d55834399d71e6 (patch)
treeb3fc0b2733880c6743ec2927ce651170ee5ed3eb /src
parent21ae5135dd30bbd2ec7d2b44e07b6cb1d6425d9e (diff)
glx/tests: Provide __glXGetCurrentContext() stub when needed
Refine 8c533022. Provide a stub __glXGetCurrentContext() function when $(DEFINES) are such that it is not a macro. Signed-off-by: Jon TURNEY <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/glx/tests/fake_glx_screen.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/glx/tests/fake_glx_screen.cpp b/src/glx/tests/fake_glx_screen.cpp
index 815330a0b1f..ccb1afae47d 100644
--- a/src/glx/tests/fake_glx_screen.cpp
+++ b/src/glx/tests/fake_glx_screen.cpp
@@ -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