2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 06:25:31 +00:00

Use __declspec( thread ) for thread local storage when compiling with Visual Studio 2015 and higher

This commit is contained in:
Ondřej Surý
2018-08-25 13:29:27 +02:00
parent 18ebcf2b30
commit 7ab228cf71
3 changed files with 9 additions and 0 deletions

View File

@@ -67,6 +67,8 @@
static thread_local isc_once_t isc_random_once = ISC_ONCE_INIT;
#elif defined(HAVE___THREAD)
static __thread isc_once_t isc_random_once = ISC_ONCE_INIT;
#elif defined(HAVE___DECLSPEC_THREAD)
static __declspec( thread ) isc_once_t isc_random_once = ISC_ONCE_INIT;
#else
#error "Unknown method for defining a TLS variable!"
#endif