From b9cbbef03b3c1408e659af05047134dc26efad4c Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Sat, 25 Nov 2017 23:12:22 +0100 Subject: [PATCH] Use __declspec(thread) on Visual Studio --- .../randombytes/salsa20/randombytes_salsa20_random.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/libsodium/randombytes/salsa20/randombytes_salsa20_random.c b/src/libsodium/randombytes/salsa20/randombytes_salsa20_random.c index d06d1784..03b7c86b 100644 --- a/src/libsodium/randombytes/salsa20/randombytes_salsa20_random.c +++ b/src/libsodium/randombytes/salsa20/randombytes_salsa20_random.c @@ -64,7 +64,11 @@ BOOLEAN NTAPI RtlGenRandom(PVOID RandomBuffer, ULONG RandomBufferLength); #endif #ifndef TLS -# define TLS +# ifdef _WIN32 +# define TLS __declspec(thread) +# else +# define TLS +# endif #endif typedef struct Salsa20RandomGlobal_ {