Correct the usage of gzFile.

Thanks to spirit for pointing that QF wasn't compiling with zlib 1.2.6
(archlinux, not yet in debian).

I was using gzFile as "gzFile *gzfile", but gzFile is already a pointer. In
older versions of zlib (including the 1.2.3 that's in debian), gzFile is
declared as a void *, and it seems that gcc is happy with assigning void **
to void *. However, in recent zlib, gzFile is now struct gzFile_s *, which
gcc is most definitely unhappy about assigning to struct gzFile **.

I just hope that either I had misread the type back when I wrote quakeio,
or that nobody is using such an ancient zlib.
This commit is contained in:
Bill Currie 2012-02-13 09:00:31 +09:00
parent dd6ff1fde2
commit d8a37bc791

View file

@ -80,7 +80,7 @@ static __attribute__ ((used)) const char rcsid[] =
struct QFile_s {
FILE *file;
#ifdef HAVE_ZLIB
gzFile *gzfile;
gzFile gzfile;
#endif
off_t size;
off_t start;