diff --git a/core/zip/inc/ZIP.h b/core/zip/inc/ZIP.h
index 41f46184eccf5ef9985207b52c1175d14198c507..5c885362ad83a685f7c4bb37248f855b0f4341e3 100644
--- a/core/zip/inc/ZIP.h
+++ b/core/zip/inc/ZIP.h
@@ -110,7 +110,11 @@ unsigned R__bi_reverse OF((unsigned value, int length));
 void     R__bi_windup  OF((void));
 void     R__copy_block OF((char far *buf, unsigned len, int header));
 int      R__seekable   OF((void));
+#ifdef _MSC_VER  
+extern __declspec( thread )  int (*R__read_buf) OF((char *buf, unsigned size));
+#else
 extern   __thread int (*R__read_buf) OF((char *buf, unsigned size));
+#endif
 ulg      R__memcompress OF((char *tgt, ulg tgtsize, char *src, ulg srcsize));
 void     R__error      OF((char *h));