]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Fix the missing thread_local define on Windows
authorOndřej Surý <ondrej@isc.org>
Thu, 21 May 2020 08:33:30 +0000 (10:33 +0200)
committerOndřej Surý <ondrej@isc.org>
Thu, 28 May 2020 06:07:57 +0000 (08:07 +0200)
lib/isc/win32/include/isc/platform.h.in
lib/isc/win32/ltdl.h

index 41eecd94aa371ad80903266e6f7777e1520f1045..e2bf50b681925134bb06c62c6a3e35358c644817 100644 (file)
@@ -9,8 +9,7 @@
  * information regarding copyright ownership.
  */
 
-#ifndef ISC_PLATFORM_H
-#define ISC_PLATFORM_H 1
+#pragma once
 
 /*****
  ***** Platform-dependent defines.
 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 */
index 16beb862ea88d4565cfbea7dd93fd0c549e3c1b7..90bc10b09751a5260e0fd55f84802f40a2f6b398 100644 (file)
@@ -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) {