From 8f6157142b5ed4a108eae54e66afef4cc113e06b Mon Sep 17 00:00:00 2001 From: reuk Date: Wed, 9 Apr 2025 14:14:50 +0100 Subject: [PATCH] Zlib: Remove extern "C" for declarations in bundled private namespace --- modules/juce_core/zip/zlib/JUCE_CHANGES.txt | 4 ++++ modules/juce_core/zip/zlib/zlib.h | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/modules/juce_core/zip/zlib/JUCE_CHANGES.txt b/modules/juce_core/zip/zlib/JUCE_CHANGES.txt index be22b0bbc6..9318ab8d1c 100644 --- a/modules/juce_core/zip/zlib/JUCE_CHANGES.txt +++ b/modules/juce_core/zip/zlib/JUCE_CHANGES.txt @@ -3,3 +3,7 @@ Include guards were added to these files to support multiple inclusion in a unity-style build. +# zlib.h + +`extern "C"` was removed to avoid symbol collisions when including multiple +copies of zlib in the same project. diff --git a/modules/juce_core/zip/zlib/zlib.h b/modules/juce_core/zip/zlib/zlib.h index 8d4b932eaf..075f32c6b8 100644 --- a/modules/juce_core/zip/zlib/zlib.h +++ b/modules/juce_core/zip/zlib/zlib.h @@ -34,7 +34,7 @@ #include "zconf.h" #ifdef __cplusplus -extern "C" { +// extern "C" { #endif #define ZLIB_VERSION "1.3.1" @@ -1932,7 +1932,7 @@ ZEXTERN int ZEXPORTVA gzvprintf(gzFile file, #endif #ifdef __cplusplus -} +// } #endif #endif /* ZLIB_H */