diff options
author | Jeff Morriss <jeff.morriss@ulticom.com> | 2010-09-22 21:51:53 +0000 |
---|---|---|
committer | Jeff Morriss <jeff.morriss@ulticom.com> | 2010-09-22 21:51:53 +0000 |
commit | 80d78c6794b0b6564268cae546ab83ccf068e67a (patch) | |
tree | 54becbac9c1e7f96a42456e6d80e95f72aaf5319 | |
parent | 7364bef1b3262a02a649c7375acf48076e170706 (diff) |
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
-rw-r--r-- | configure.in | 6 | ||||
-rw-r--r-- | wiretap/wtap.c | 2 |
2 files changed, 8 insertions, 0 deletions
diff --git a/configure.in b/configure.in index 0cdcf9b014..89fde09b70 100644 --- a/configure.in +++ b/configure.in @@ -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) diff --git a/wiretap/wtap.c b/wiretap/wtap.c index 6ce9f32d16..a48ceb813b 100644 --- a/wiretap/wtap.c +++ b/wiretap/wtap.c @@ -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 |