git: ca211d5f6499 - stable/12 - sys/contrib/zlib: Always define Z_U8 and Z_U4

From: Ed Maste <>
Date: Tue, 05 Apr 2022 19:43:29 UTC
The branch stable/12 has been updated by emaste:


commit ca211d5f64999e5efe6ac3459d912aa6f8d0546e
Author:     Xin LI <>
AuthorDate: 2022-04-03 18:45:38 +0000
Commit:     Ed Maste <>
CommitDate: 2022-04-05 19:41:58 +0000

    sys/contrib/zlib: Always define Z_U8 and Z_U4
    This is a temporary hack for zlib to make sure that the library
    still builds when building with Z_SOLO (used in kernel and loader),
    as zlib is depending on limits.h which is only available in STDC
    PR:             kern/262977
    MFC after:      3 days
    (cherry picked from commit 0a21252adf11f7e839eabeb530e75cd1f9cd5386)
 sys/contrib/zlib/zconf.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/sys/contrib/zlib/zconf.h b/sys/contrib/zlib/zconf.h
index 0654395f3fca..842402232cc0 100644
--- a/sys/contrib/zlib/zconf.h
+++ b/sys/contrib/zlib/zconf.h
@@ -8,6 +8,11 @@
 #ifndef ZCONF_H
 #define ZCONF_H
+#if defined(Z_SOLO)
+#include <sys/types.h>
+#define Z_U8 __uint64_t
+#define Z_U4 __uint32_t
  * If you *really* need a unique prefix for all types and library functions,
  * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it.