From 39ca12e136b5ec4978d4e17f6df4fffc05fd5c5e Mon Sep 17 00:00:00 2001 From: Jonas Zaddach <5988756+zaddach@users.noreply.github.com> Date: Thu, 7 Aug 2025 11:01:06 +0200 Subject: [PATCH] Remove ZEXTERN and EXPORT from internal functions In inflate64.c on Windows, as zlib.h is included, it sets ZEXTERN to " __declspec(dllimport)". In consequence, our internal functions have the wrong linkage and linking fails because of the missing dll functions. --- libclamav/inflate64.c | 6 +++--- libclamav/inflate64.h | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/libclamav/inflate64.c b/libclamav/inflate64.c index 5be6cd0cd..bafdcfc2f 100644 --- a/libclamav/inflate64.c +++ b/libclamav/inflate64.c @@ -62,7 +62,7 @@ local int inflate_table OF((codetype type, unsigned short FAR *lens, unsigned FAR *bits, unsigned short FAR *work)); -int ZEXPORT inflate64Init2(strm, windowBits) +int inflate64Init2(strm, windowBits) z_stream64p strm; int windowBits; { @@ -375,7 +375,7 @@ unsigned out; will return Z_BUF_ERROR if it has not reached the end of the stream. */ -int ZEXPORT inflate64(strm, flush) +int inflate64(strm, flush) z_stream64p strm; int flush; { @@ -805,7 +805,7 @@ int flush; return ret; } -int ZEXPORT inflate64End(strm) +int inflate64End(strm) z_stream64p strm; { struct inflate_state FAR *state; diff --git a/libclamav/inflate64.h b/libclamav/inflate64.h index b7918cb2e..12cf2aaa7 100644 --- a/libclamav/inflate64.h +++ b/libclamav/inflate64.h @@ -91,8 +91,8 @@ typedef struct z_stream64_s { typedef z_stream64 FAR *z_stream64p; -ZEXTERN int ZEXPORT inflate64 OF((z_stream64p strm, int flush)); -ZEXTERN int ZEXPORT inflate64End OF((z_stream64p strm)); -ZEXTERN int ZEXPORT inflate64Init2 OF((z_stream64p strm, int windowBits)); +int inflate64 OF((z_stream64p strm, int flush)); +int inflate64End OF((z_stream64p strm)); +int inflate64Init2 OF((z_stream64p strm, int windowBits)); #endif /* __INFLATE64_H */