zlib
zlib copied to clipboard
zLib 1.2.12 fails to build in VC++/Win32 due to mismatched declarations
There are several errors in crc32.c
, mostly due to mismatched argument size in a few calls. For example, crc32_combine_gen64
was seen first taking a 64-bit argument and then called here with a 32-bit one.
uLong ZEXPORT crc32_combine_gen(len2)
z_off_t len2;
{
- return crc32_combine_gen64(len2);
+ return crc32_combine_gen64((z_off64_t) len2);
}
One more is due to crc32_combine_op
being declared as an exported function in a header and then defined without the export declaration.
-uLong crc32_combine_op(crc1, crc2, op)
+uLong ZEXPORT crc32_combine_op(crc1, crc2, op)
You can see example failures here:
https://github.com/StoneStepsInc/zlib-nuget/runs/6747245701?check_suite_focus=true
Patches for these and Makefile.msc, which mixes up release/debug CRT, are available here.
https://github.com/StoneStepsInc/zlib-nuget/tree/master/patches