opensmalltalk cog-spur: update to VMMaker.oscog-eem.3504
[oi-userland.git] / components / library / FreeImage / patches / ZLibInterface.cpp.patch
blobec583e31321d2070d1c0719450e5fbbdd370e7c9
1 --- FreeImage/Source/FreeImage/ZLibInterface.cpp Wed Mar 4 00:07:10 2015
2 +++ FreeImage/Source/FreeImage/ZLibInterface_.cpp Tue May 24 01:32:47 2022
3 @@ -19,10 +19,9 @@
4 // Use at your own risk!
5 // ==========================================================
7 -#include "../ZLib/zlib.h"
8 +#include "zlib.h"
9 #include "FreeImage.h"
10 #include "Utilities.h"
11 -#include "../ZLib/zutil.h" /* must be the last header because of error C3163 in VS2008 (_vsnprintf defined in stdio.h) */
13 /**
14 Compresses a source buffer into a target buffer, using the ZLib library.
15 @@ -115,7 +114,7 @@
16 return 0;
17 case Z_OK: {
18 // patch header, setup crc and length (stolen from mod_trace_output)
19 - BYTE *p = target + 8; *p++ = 2; *p = OS_CODE; // xflags, os_code
20 + BYTE *p = target + 8; *p++ = 2; *p = 0x03; // xflags, unix's os_code=3
21 crc = crc32(crc, source, source_size);
22 memcpy(target + 4 + dest_len, &crc, 4);
23 memcpy(target + 8 + dest_len, &source_size, 4);