From 36425c43c956e6eb22be8b4ef147666285bc8e51 Mon Sep 17 00:00:00 2001 From: Jesse Natalie Date: Fri, 10 Dec 2021 16:54:08 -0800 Subject: [PATCH] glapi: Never use dllimport/dllexport for TLS vars on Windows Fixes: c691149f ("win32: Fixes thread local on win32 with clang/mingw") Reviewed-by: Yonggang Luo Part-of: --- src/mapi/glapi/glapi.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mapi/glapi/glapi.h b/src/mapi/glapi/glapi.h index 8842dad851f..60be92a1cd8 100644 --- a/src/mapi/glapi/glapi.h +++ b/src/mapi/glapi/glapi.h @@ -46,6 +46,7 @@ #include "util/macros.h" #include "util/u_thread.h" +#include "util/detect_os.h" #ifdef __cplusplus @@ -79,7 +80,7 @@ struct _glapi_table; #if defined (USE_ELF_TLS) -#if defined(USE_TLS_BEHIND_FUNCTIONS) +#if DETECT_OS_WINDOWS extern __THREAD_INITIAL_EXEC struct _glapi_table * _glapi_tls_Dispatch; extern __THREAD_INITIAL_EXEC void * _glapi_tls_Context; #else