summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--saveload.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/saveload.c b/saveload.c
index 365f0b496..fdc4d5847 100644
--- a/saveload.c
+++ b/saveload.c
@@ -905,7 +905,12 @@ static void WriteMem(uint size)
//********************************************
#if defined(WITH_ZLIB)
-#define ZLIB_WINAPI // Needed so zlib uses the right calling convention.
+
+// This is needed to zlib uses the stdcall calling convention on visual studio
+#ifdef _MSC_VER
+#define ZLIB_WINAPI
+#endif
+
#include <zlib.h>
static z_stream _z;