summaryrefslogtreecommitdiffstats
path: root/src/glx/tests/fake_glx_screen.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/glx/tests/fake_glx_screen.cpp')
-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