forked from osmocom/wireshark
Very old versions of libz (such as the one that comes with Solaris 10) don't have gzclearerr(). Check for that function and only use it if we have it.
svn path=/trunk/; revision=34187
This commit is contained in:
parent
7364bef1b3
commit
80d78c6794
|
@ -1157,6 +1157,12 @@ else
|
|||
fi
|
||||
fi
|
||||
|
||||
if test "x$want_zlib" != "xno" ; then
|
||||
AC_CHECK_LIB(z, gzclearerr,
|
||||
[
|
||||
AC_DEFINE(HAVE_GZCLEARERR, 1, [Define if we have gzclearerr])
|
||||
])
|
||||
fi
|
||||
|
||||
dnl pcre check
|
||||
AC_MSG_CHECKING(whether to use libpcre for regular expressions in dfilters)
|
||||
|
|
|
@ -648,10 +648,12 @@ wtap_close(wtap *wth)
|
|||
void
|
||||
wtap_cleareof(wtap *wth _U_) {
|
||||
#ifdef HAVE_LIBZ
|
||||
#ifdef HAVE_GZCLEARERR
|
||||
/* Reset EOF */
|
||||
if (gzeof(wth->fh))
|
||||
gzclearerr(wth->fh);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
gboolean
|
||||
|
|
Loading…
Reference in New Issue