From 76ce2debba9ae8a8711a1e6453307e714e7ab244 Mon Sep 17 00:00:00 2001 From: Amar Takhar Date: Mon, 14 Jul 2025 23:43:33 -0400 Subject: [PATCH] contrib: Apply changes to zlib This is from: 0ab6c7bc5888d32be40011f47b421787214f006b --- contrib/cpukit/zlib/zconf.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/contrib/cpukit/zlib/zconf.h b/contrib/cpukit/zlib/zconf.h index 62adc8d843..656d50ee0c 100644 --- a/contrib/cpukit/zlib/zconf.h +++ b/contrib/cpukit/zlib/zconf.h @@ -7,6 +7,10 @@ #ifndef ZCONF_H #define ZCONF_H +#ifdef __rtems__ +#define ZLIB_CONST 1 +#define Z_PREFIX 1 +#endif /* __rtems__ */ /* * If you *really* need a unique prefix for all types and library functions, @@ -416,6 +420,7 @@ typedef uLong FAR uLongf; typedef Byte *voidp; #endif +#ifndef __rtems__ #if !defined(Z_U4) && !defined(Z_SOLO) && defined(STDC) # include # if (UINT_MAX == 0xffffffffUL) @@ -426,6 +431,10 @@ typedef uLong FAR uLongf; # define Z_U4 unsigned short # endif #endif +#else /* __rtems__ */ +#include +#define Z_U4 uint32_t +#endif /* __rtems__ */ #ifdef Z_U4 typedef Z_U4 z_crc_t; @@ -433,6 +442,14 @@ typedef uLong FAR uLongf; typedef unsigned long z_crc_t; #endif +#ifdef __rtems__ +# define Z_HAVE_UNISTD_H +#endif + +#ifdef __rtems__ +# define Z_HAVE_STDARG_H +#endif + #ifdef HAVE_UNISTD_H /* may be set to #if 1 by ./configure */ # define Z_HAVE_UNISTD_H #endif