summaryrefslogtreecommitdiffstats
path: root/libvncserver/zlib.c
diff options
context:
space:
mode:
authorChristian Beier <dontmind@freeshell.org>2018-11-19 09:56:18 +0100
committerGitHub <noreply@github.com>2018-11-19 09:56:18 +0100
commit2c61a095c6fd9e1654bf41dd96b74223815df83f (patch)
tree6ebb42dcf64aa816ebcc5a057549b9dd2e1bebda /libvncserver/zlib.c
parentcfdbb94038e76ff002e3d68dc6b1ca0df2606ef6 (diff)
parent2411769962b1c95015bfc2d0c817a34213afbbc9 (diff)
downloadlibtdevnc-2c61a095c6fd9e1654bf41dd96b74223815df83f.tar.gz
libtdevnc-2c61a095c6fd9e1654bf41dd96b74223815df83f.zip
Merge pull request #266 from veyon/fix-tls
LibVNCServer: properly use thread-local storage
Diffstat (limited to 'libvncserver/zlib.c')
-rw-r--r--libvncserver/zlib.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/libvncserver/zlib.c b/libvncserver/zlib.c
index 45a1314..6fee4df 100644
--- a/libvncserver/zlib.c
+++ b/libvncserver/zlib.c
@@ -45,10 +45,11 @@
* tight. N.B. ZRLE does it the traditional way with per-client storage
* (and so at least ZRLE will work threaded on older systems.)
*/
-#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