Hi,
I had to apply the attached patch to convince SuSE Linux 12.2 to compile mana.c
gcc version is "(SUSE Linux) 4.6.2"
Problem is that gz{write,close, etc.} expect a 1st argument of type gzFile (see
zlib.h), whereas out_file is FILE*. In fact, out_file is a cast to FILE*, even
in the case when we work on a gzfile (HAVE_ZLIB).
Could you please confirm that the patch is correct, and possibly apply it to trunk?
I haven't checked if mana works as advertised now.
Cheers,
Randolf |
Index: src/mana.c
===================================================================
--- src/mana.c (revision 5334)
+++ src/mana.c (working copy)
@@ -1987,7 +1987,7 @@
} else {
#ifdef HAVE_ZLIB
if (out_gzip)
- gzclose(out_file);
+ gzclose((gzFile)out_file);
else
#endif
fclose(out_file);
@@ -2311,7 +2311,7 @@
/* write record to device */
#ifdef HAVE_ZLIB
if (out_gzip)
- status = gzwrite(file, buffer, size) == size ? SS_SUCCESS : SS_FILE_ERROR;
+ status = gzwrite((gzFile)file, buffer, size) == size ? SS_SUCCESS : SS_FILE_ERROR;
else
#endif
status =
@@ -2430,7 +2430,7 @@
/* write record to device */
#ifdef HAVE_ZLIB
if (out_gzip)
- status = gzwrite(file, pevent_copy, size) == size ? SUCCESS : SS_FILE_ERROR;
+ status = gzwrite((gzFile)file, pevent_copy, size) == size ? SUCCESS : SS_FILE_ERROR;
else
#endif
status =
@@ -4119,7 +4119,7 @@
size = pevent->data_size + sizeof(EVENT_HEADER);
#ifdef HAVE_ZLIB
if (out_gzip)
- status = gzwrite(out_file, pevent, size) == size ? SUCCESS : SS_FILE_ERROR;
+ status = gzwrite((gzFile)out_file, pevent, size) == size ? SUCCESS : SS_FILE_ERROR;
else
#endif
status =
@@ -4390,7 +4390,7 @@
} else {
#ifdef HAVE_ZLIB
if (out_gzip)
- gzclose(out_file);
+ gzclose((gzFile)out_file);
else
#endif
fclose(out_file);
|