The International Simutrans Forum

Development => Patches & Projects => Incorporated Patches and Solved Bug Reports => Topic started by: melynx on February 06, 2012, 11:57:19 AM

Title: Compile fails with zlib-1.2.6
Post by: melynx on February 06, 2012, 11:57:19 AM
Hi,

Decided to try this game but it failed to compile on my gentoo machine... dug around and realize that its due to zlib-1.2.6....

There is a change in zlib.h

-typedef voidp gzFile;       /* opaque gzip file descriptor */
+typedef struct gzFile_s *gzFile;    /* semi-opaque gzip file descriptor */


since gzFile is changed from void * to gzFile_s *, implicit casting from FILE * to gzFile_s * will not work in loadsave.cc for all the zlib functions...

Wrote a quick patch to do explicit cast and tested by setting
loadsave_t::mode_t loadsave_t::save_mode = zipped;

Regards,
Zheng Leong
Title: Re: Compile fails with zlib-1.2.6
Post by: Dwachs on February 29, 2012, 09:37:45 AM
Thanks for the report. A different approach is now incorporated.