1
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:
Scr3amer 2023-09-01 17:37:36 -04:00 committed by GitHub
parent baa75cd1b8
commit a04c8687ac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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