fix: threadlocal definition issue

This commit is contained in:
dapan1121 2024-08-02 15:50:17 +08:00
parent 857d9e825b
commit 79cf8b82d0
1 changed files with 4 additions and 3 deletions

View File

@ -188,9 +188,10 @@ void syslog(int unused, const char *format, ...);
#define ALIGN8(n) ALIGN_NUM(n, 8) #define ALIGN8(n) ALIGN_NUM(n, 8)
#undef threadlocal #undef threadlocal
#ifdef _ISOC11_SOURCE //#ifdef _ISOC11_SOURCE
#define threadlocal _Thread_local //#define threadlocal _Thread_local
#elif defined(__APPLE__) //#elif defined(__APPLE__)
#if defined(__APPLE__)
#define threadlocal __thread #define threadlocal __thread
#elif defined(__GNUC__) && !defined(threadlocal) #elif defined(__GNUC__) && !defined(threadlocal)
#define threadlocal __thread #define threadlocal __thread