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:
Jeff Morriss 2010-09-22 21:51:53 +00:00
parent 7364bef1b3
commit 80d78c6794
2 changed files with 8 additions and 0 deletions

View File

@ -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)

View File

@ -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