#369 Readlog incompatible with zlib 1.2.6

trunk
closed-fixed
player (137)
5
2012-07-07
2012-07-07
Rich Mattes
No

/home/stefano/builds/player/src/player-3.0.2/server/drivers/shell/readlog.cc:
In member function ‘virtual void ReadLog::Main()’:
/home/stefano/builds/player/src/player-3.0.2/server/drivers/shell/readlog.cc:668:43:
error: cannot convert ‘FILE* {aka _IO_FILE*}’ to ‘gzFile’ for argument
‘1’ to ‘off_t gzseek(gzFile, off_t, int)’
/home/stefano/builds/player/src/player-3.0.2/server/drivers/shell/readlog.cc:714:62:
error: cannot convert ‘FILE* {aka _IO_FILE*}’ to ‘gzFile’ for argument
‘1’ to ‘char* gzgets(gzFile, char*, int)’
make[2]: *** [server/libplayerdrivers/CMakeFiles/playerdrivers.dir/__/drivers/shell/readlog.o]
Error 1
make[1]: *** [server/libplayerdrivers/CMakeFiles/playerdrivers.dir/all] Error 2
make: *** [all] Error 2

This may be related to the API change in zlib from 1.2.5 to 1.2.6,
which is now installed on my system. According to another archlinux
user, there has been a change in zlib.h in 1.2.6:

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

Fix:
668c668
< ret = gzseek(this->file,0,SEEK_SET);
---
> ret = gzseek((gzFile)this->file,0,SEEK_SET);
714c714
< ret = (gzgets(this->file, this->line, this->line_size) == NULL);
---
> ret = (gzgets((gzFile)this->file, this->line, this->line_size) == NULL);

Discussion

  • Rich Mattes

    Rich Mattes - 2012-07-07
    • status: open --> closed-fixed
     
  • Rich Mattes

    Rich Mattes - 2012-07-07

    Fixed in SVN HEAD. Thanks very much for the report.

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks