aboutsummaryrefslogtreecommitdiffstats
path: root/epan/tvbuff_zlib.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2015-12-16 01:37:00 -0800
committerGuy Harris <guy@alum.mit.edu>2015-12-16 17:58:09 +0000
commit2943ac5381ed424348c66db76cd6869dbdf71710 (patch)
tree527f5d273cdad18b69de94b743e67c98204aaa94 /epan/tvbuff_zlib.c
parent6d60c4d4684c2c03a43f1b8720497348cf17d357 (diff)
Make zlib API constness-aware, take 2.
ZLIB_CONST must be defined before including zlib.h to expose z_const, *AND* z_const shouldn't be used unless it's defined, because older versions of zlib don't define it even if you define ZLIB_CONST. While we're at it, throw in some DIAG_OFF(cast-qual)/DIAG_ON(cast-qual) pairs to suppress unavoidable "cast throws away const qualification" warnings. The original "make zlib constness-aware" change also removed an unnecessary include of <zlib.h> from wiretap/wtap.c, so we do that as well. Change-Id: I3c5269a8fbc54bbbb4d316544cc7b8fa30614c19 Reviewed-on: https://code.wireshark.org/review/12675 Petri-Dish: Guy Harris <guy@alum.mit.edu> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'epan/tvbuff_zlib.c')
-rw-r--r--epan/tvbuff_zlib.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/epan/tvbuff_zlib.c b/epan/tvbuff_zlib.c
index c92a5d506d..218ff53cb2 100644
--- a/epan/tvbuff_zlib.c
+++ b/epan/tvbuff_zlib.c
@@ -28,6 +28,7 @@
#include <string.h>
#ifdef HAVE_LIBZ
+#define ZLIB_CONST
#include <zlib.h>
#endif