From cdc734a622c63ad238ae7f8d47636fc708fa6387 Mon Sep 17 00:00:00 2001 From: Jon TURNEY Date: Tue, 12 Nov 2013 22:54:35 +0000 Subject: [PATCH] glx/tests: Provide __glXGetCurrentContext() stub when needed Refine 8c533022. Provide a stub __glXGetCurrentContext() function when $(DEFINES) are such that is not a macro. Signed-off-by: Jon TURNEY --- src/glx/tests/fake_glx_screen.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/glx/tests/fake_glx_screen.cpp b/src/glx/tests/fake_glx_screen.cpp index 815330a..ccb1afa 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 -- 1.8.3.4