mirror of
https://github.com/jedisct1/libsodium.git
synced 2024-12-19 10:05:05 -07:00
Define TLS as _Thread_local is compiler supports C11 (#1304)
This avoids having warnings when compiling with Clang-MinGW on windows.
This commit is contained in:
parent
baa75cd1b8
commit
a04c8687ac
@ -98,7 +98,11 @@ BOOLEAN NTAPI RtlGenRandom(PVOID RandomBuffer, ULONG RandomBufferLength);
|
||||
|
||||
#ifndef TLS
|
||||
# ifdef _WIN32
|
||||
# define TLS __declspec(thread)
|
||||
# if (defined __STDC_VERSION__ && __STDC_VERSION__ >= 201112L)
|
||||
# define TLS _Thread_local
|
||||
# else
|
||||
# define TLS __declspec(thread)
|
||||
# endif
|
||||
# else
|
||||
# define TLS
|
||||
# endif
|
||||
|
Loading…
Reference in New Issue
Block a user