From 79cf8b82d0b34bc19487867a787b574b41850476 Mon Sep 17 00:00:00 2001 From: dapan1121 Date: Fri, 2 Aug 2024 15:50:17 +0800 Subject: [PATCH] fix: threadlocal definition issue --- include/os/osDef.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/include/os/osDef.h b/include/os/osDef.h index 75c6a0dc73..439f4b5c6a 100644 --- a/include/os/osDef.h +++ b/include/os/osDef.h @@ -188,9 +188,10 @@ void syslog(int unused, const char *format, ...); #define ALIGN8(n) ALIGN_NUM(n, 8) #undef threadlocal -#ifdef _ISOC11_SOURCE -#define threadlocal _Thread_local -#elif defined(__APPLE__) +//#ifdef _ISOC11_SOURCE +//#define threadlocal _Thread_local +//#elif defined(__APPLE__) +#if defined(__APPLE__) #define threadlocal __thread #elif defined(__GNUC__) && !defined(threadlocal) #define threadlocal __thread