From 03f0755e35ca1a342c64c6f56a71ac596b81552d Mon Sep 17 00:00:00 2001 From: tb Date: Sat, 9 Nov 2024 21:52:06 +0000 Subject: [PATCH] libz: sync with base --- sys/lib/libz/zconf.h | 10 ++++++---- sys/lib/libz/zutil.h | 4 +++- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/sys/lib/libz/zconf.h b/sys/lib/libz/zconf.h index 7221b8923b6..9491e9369e1 100644 --- a/sys/lib/libz/zconf.h +++ b/sys/lib/libz/zconf.h @@ -233,10 +233,12 @@ # endif #endif -#if defined(ZLIB_CONST) && !defined(z_const) -# define z_const const -#else -# define z_const +#ifndef z_const +# ifdef ZLIB_CONST +# define z_const const +# else +# define z_const +# endif #endif #ifdef Z_SOLO diff --git a/sys/lib/libz/zutil.h b/sys/lib/libz/zutil.h index ded8bebebe2..b548ce86f0a 100644 --- a/sys/lib/libz/zutil.h +++ b/sys/lib/libz/zutil.h @@ -80,7 +80,9 @@ extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */ /* To be used only when the state is known to be valid */ /* common constants */ - +#if MAX_WBITS < 9 || MAX_WBITS > 15 +# error MAX_WBITS must be in 9..15 +#endif #ifndef DEF_WBITS # define DEF_WBITS MAX_WBITS #endif