TCC doesn't support the __thread attribute,

which is a GCC extension.
Use this extension only for GCC.
This commit is contained in:
Patrick Pelissier committed 2023-03-13 23:45:28 +01:00
1 parent bfa948dc7a
commit 2d3c25cd85
1 file changed
+5 -1
+5 -1
View File
@@ -480,7 +480,11 @@ static inline void m_once_call(m_once_t o, void (*func)(void))
pthread_once(o,func);
}
#define M_THREAD_ATTR __thread
#ifdef defined(__GNUC__)
# define M_THREAD_ATTR __thread
#else
# define M_THREAD_ATTR /* Not supported */
#endif
M_END_PROTECTED_CODE