summaryrefslogtreecommitdiff
path: root/w32/subproc/w32err.c
diff options
context:
space:
mode:
Diffstat (limited to 'w32/subproc/w32err.c')
-rw-r--r--w32/subproc/w32err.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/w32/subproc/w32err.c b/w32/subproc/w32err.c
index 9bfa2c4..712fccd 100644
--- a/w32/subproc/w32err.c
+++ b/w32/subproc/w32err.c
@@ -11,9 +11,12 @@
*/
char *
map_windows32_error_to_string (DWORD ercode) {
-/* __declspec (thread) necessary if you will use multiple threads */
+/* __declspec (thread) necessary if you will use multiple threads on MSVC */
+#ifdef _MSC_VER
__declspec (thread) static char szMessageBuffer[128];
-
+#else
+static char szMessageBuffer[128];
+#endif
/* Fill message buffer with a default message in
* case FormatMessage fails
*/