News:

Simutrans.com Portal
Our Simutrans site. You can find everything about Simutrans from here.

Compile fails with zlib-1.2.6

Started by melynx, February 06, 2012, 11:57:19 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

melynx

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

Dwachs

Thanks for the report. A different approach is now incorporated.