diff --git a/saveload.c b/saveload.c index 365f0b4967..fdc4d58479 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 static z_stream _z;