Skip to content

Commit

Permalink
Fallback to _Thread_local on C11 regardless of the platform
Browse files Browse the repository at this point in the history
  • Loading branch information
jedisct1 committed Sep 1, 2023
1 parent a04c868 commit 8ad54cb
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/libsodium/randombytes/internal/randombytes_internal_random.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,13 +96,13 @@ BOOLEAN NTAPI RtlGenRandom(PVOID RandomBuffer, ULONG RandomBufferLength);
# endif
#endif

#if !defined(TLS) && !defined(__STDC_NO_THREADS__) && \
defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L
# define TLS _Thread_local
#endif
#ifndef TLS
# ifdef _WIN32
# if (defined __STDC_VERSION__ && __STDC_VERSION__ >= 201112L)
# define TLS _Thread_local
# else
# define TLS __declspec(thread)
# endif
# define TLS __declspec(thread)
# else
# define TLS
# endif
Expand Down

0 comments on commit 8ad54cb

Please sign in to comment.