Patches
Plain Diff
Also need to #include <stddef.h> for zlib.h, and need to workaround the inability to use wide characters in constructed error messages with zlib's interface.