From 871a0b8a5f0afe8781d2ddbe777ba2123c7c871f Mon Sep 17 00:00:00 2001 From: tb Date: Tue, 9 Jul 2024 10:51:14 +0000 Subject: [PATCH] sync with userland: let z_off_t fall back to long long instead of long In the boot blocks, this would result in various 64-bit instruction being used, which might result in undesirable bloat in legacy boot loaders, so add a workaround for the _STANDALONE case to still fall back to long instead of long long. with/ok deraadt, ok millert --- sys/lib/libz/zconf.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sys/lib/libz/zconf.h b/sys/lib/libz/zconf.h index 22475032d63..1a3d41ebbb6 100644 --- a/sys/lib/libz/zconf.h +++ b/sys/lib/libz/zconf.h @@ -434,6 +434,9 @@ typedef uLong FAR uLongf; #ifdef _KERNEL # define Z_HAVE_UNISTD_H #endif +#ifdef _STANDALONE +# define z_off_t long +#endif #ifdef HAVE_UNISTD_H /* may be set to #if 1 by ./configure */ # define Z_HAVE_UNISTD_H @@ -508,7 +511,7 @@ typedef uLong FAR uLongf; #endif #ifndef z_off_t -# define z_off_t long +# define z_off_t long long #endif #if !defined(_WIN32) && defined(Z_LARGE64) -- 2.20.1