From bbb7e3c5f584d6edb2f2c63e58d328401756519d Mon Sep 17 00:00:00 2001 From: Sandu Liviu Catalin Date: Wed, 8 Mar 2017 00:46:39 +0200 Subject: [PATCH] Adjust thread-local local static variable syntax for MinGW/GCC. --- src/LinearMath/btQuickprof.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/LinearMath/btQuickprof.cpp b/src/LinearMath/btQuickprof.cpp index 16ca88cdc..db6d56f83 100644 --- a/src/LinearMath/btQuickprof.cpp +++ b/src/LinearMath/btQuickprof.cpp @@ -687,7 +687,11 @@ unsigned int btQuickprofGetCurrentThreadIndex2() { const unsigned int kNullIndex = ~0U; #ifdef _WIN32 - __declspec( thread ) static unsigned int sThreadIndex = kNullIndex; + #if defined(__MINGW32__) || defined(__MINGW64__) + static __thread unsigned int sThreadIndex = kNullIndex; + #else + __declspec( thread ) static unsigned int sThreadIndex = kNullIndex; + #endif #else #ifdef __APPLE__ #if TARGET_OS_IPHONE