From 5ab59e5332215f149b532436c4d55834399d71e6 Mon Sep 17 00:00:00 2001 From: Jon TURNEY Date: Tue, 12 Nov 2013 22:54:35 +0000 Subject: 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 --- src/glx/tests/fake_glx_screen.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/glx') 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 -- cgit v1.2.3