From: Ondřej Surý Date: Thu, 21 May 2020 08:33:30 +0000 (+0200) Subject: Fix the missing thread_local define on Windows X-Git-Tag: v9.17.2~55^2~11 X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=5bd2037b4e255611ceff80925497f37adcc65eea;p=thirdparty%2Fbind9.git Fix the missing thread_local define on Windows --- diff --git a/lib/isc/win32/include/isc/platform.h.in b/lib/isc/win32/include/isc/platform.h.in index 41eecd94aa3..e2bf50b6819 100644 --- a/lib/isc/win32/include/isc/platform.h.in +++ b/lib/isc/win32/include/isc/platform.h.in @@ -9,8 +9,7 @@ * information regarding copyright ownership. */ -#ifndef ISC_PLATFORM_H -#define ISC_PLATFORM_H 1 +#pragma once /***** ***** Platform-dependent defines. @@ -34,6 +33,10 @@ typedef uint32_t socklen_t; #endif +#ifndef thread_local +#define thread_local __declspec(thread) +#endif /* thread_local */ + /* * Limits */ @@ -97,5 +100,3 @@ typedef uint32_t socklen_t; #else #define LIBTESTS_EXTERNAL_DATA __declspec(dllimport) #endif - -#endif /* ISC_PLATFORM_H */ diff --git a/lib/isc/win32/ltdl.h b/lib/isc/win32/ltdl.h index 16beb862ea8..90bc10b0975 100644 --- a/lib/isc/win32/ltdl.h +++ b/lib/isc/win32/ltdl.h @@ -19,7 +19,7 @@ #define lt_dlsym(h, s) GetProcAddress(h, s) #define lt_dlclose(h) FreeLibrary(h) -_Thread_local LPSTR __dlerror_message[1024] = { 0 }; +__declspec(thread) LPSTR __dlerror_message[1024] = { 0 }; static const char * lt_dlerror(void) {