diff options
author | Tobias Junghans <tobydox@veyon.io> | 2018-11-07 13:03:16 +0100 |
---|---|---|
committer | Tobias Junghans <tobydox@veyon.io> | 2018-11-19 07:49:11 +0100 |
commit | 2411769962b1c95015bfc2d0c817a34213afbbc9 (patch) | |
tree | 6ebb42dcf64aa816ebcc5a057549b9dd2e1bebda /libvncserver/tight.c | |
parent | cfdbb94038e76ff002e3d68dc6b1ca0df2606ef6 (diff) | |
download | libtdevnc-2411769962b1c95015bfc2d0c817a34213afbbc9.tar.gz libtdevnc-2411769962b1c95015bfc2d0c817a34213afbbc9.zip |
LibVNCServer: properly use thread-local storage
The TLS macro never has been defined due to the missing
LIBVNCSERVER_HAVE_TLS macro. This revises the macro logic to also cover
Win32 builds with MSVC.
Diffstat (limited to 'libvncserver/tight.c')
-rw-r--r-- | libvncserver/tight.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/libvncserver/tight.c b/libvncserver/tight.c index 1081c8f..d6f4749 100644 --- a/libvncserver/tight.c +++ b/libvncserver/tight.c @@ -57,10 +57,11 @@ * that we resort to using thread local storage instead of having * per-client data. */ -#if LIBVNCSERVER_HAVE_LIBPTHREAD && LIBVNCSERVER_HAVE_TLS && !defined(TLS) && defined(__linux__) +#if defined(__GNUC__) #define TLS __thread -#endif -#ifndef TLS +#elif defined(_MSC_VER) +#define TLS __declspec(thread) +#else #define TLS #endif |