Very old versions of libz (such as the one that comes with Solaris 10) don't have...
authormorriss <morriss@f5534014-38df-0310-8fa8-9805f1628bb7>
Wed, 22 Sep 2010 21:51:53 +0000 (21:51 +0000)
committermorriss <morriss@f5534014-38df-0310-8fa8-9805f1628bb7>
Wed, 22 Sep 2010 21:51:53 +0000 (21:51 +0000)
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@34187 f5534014-38df-0310-8fa8-9805f1628bb7

configure.in
wiretap/wtap.c

index 0cdcf9b01433fcf9f4b91089de7450811dc6dc5b..89fde09b70d22c86d8b1ccfba94c56e646246c22 100644 (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)
index 6ce9f32d1674772ced29269f6a63468cd1648e8d..a48ceb813bc8e281f63cf0b2d7da44c9642eb649 100644 (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