Skip to content

Commit

Permalink
Define TLS as _Thread_local is compiler supports C11 (#1304)
Browse files Browse the repository at this point in the history
This avoids having warnings when compiling with Clang-MinGW on windows.
  • Loading branch information
Scr3amer authored Sep 1, 2023
1 parent baa75cd commit a04c868
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a04c868

Please sign in to comment.