From ec898982b0f1815cc660ece28d655677d2286626 Mon Sep 17 00:00:00 2001 From: Recep Aslantas Date: Tue, 26 May 2020 00:22:12 +0300 Subject: [PATCH] stbi: use __thread if GCC can't use _Thread_local --- stb_image.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/stb_image.h b/stb_image.h index ce3353a..f66e5f4 100644 --- a/stb_image.h +++ b/stb_image.h @@ -581,6 +581,12 @@ STBIDEF int stbi_zlib_decode_noheader_buffer(char *obuffer, int olen, const ch #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L && !defined(__STDC_NO_THREADS__) #define STBI_THREAD_LOCAL _Thread_local #endif + + #ifndef STBI_THREAD_LOCAL + #if defined(__GNUC__) + #define STBI_THREAD_LOCAL __thread + #endif + #endif #endif #ifdef _MSC_VER