summaryrefslogtreecommitdiffstats
path: root/src/3rdparty
diff options
context:
space:
mode:
authorChristian Heimlich <chris@pcserenity.com>2022-09-01 09:00:27 -0400
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2022-09-03 15:04:29 +0000
commit7e20612e9ac22d94bd6c984a86eb87391da44a84 (patch)
treeac1dbe1c5ea52bbc0fe23ade99171038d71082f9 /src/3rdparty
parenta7bc08a9a7b316c763945001a86d05b295dbe506 (diff)
Update zconf.h prefixes to match zlib v1.2.12 update
Historically Qt has used `Z_PREFIX` within zconf.h of its bundled zlib copy to prefix all zlib symbols with `z_` in order to prevent clashes with a potential system install of the library when linking statically; however, v1.2.12 introduced 3 new functions that were erroneously not accounted for in the upstream repository: - crc32_combine_gen - crc32_combine_gen64 - crc32_combine_op `403020` updated our bundled zlib to this new version and therefore Qt has inherited this oversight, now clashing with external zlib builds. Manually add prefix macro definitions for these three symbols to restore built-in zlib to its previous clash free state while waiting for the issue to be addressed upstream. Change-Id: I83f88109a08cf7e7117f1c94b4557a2c36f519c3 Reviewed-by: Kai Koehne <kai.koehne@qt.io> (cherry picked from commit 54ea62756a7b0d47370551b0ec07f602cb341228) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src/3rdparty')
-rw-r--r--src/3rdparty/zlib/qtpatches.diff14
-rw-r--r--src/3rdparty/zlib/src/zconf.h3
2 files changed, 15 insertions, 2 deletions
diff --git a/src/3rdparty/zlib/qtpatches.diff b/src/3rdparty/zlib/qtpatches.diff
index 07018605a2..e4e212dda5 100644
--- a/src/3rdparty/zlib/qtpatches.diff
+++ b/src/3rdparty/zlib/qtpatches.diff
@@ -54,7 +54,17 @@ diff -ruN orig/zconf.h src/zconf.h
/*
* 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.
-@@ -136,6 +139,7 @@
+@@ -38,6 +41,9 @@
+ # define crc32 z_crc32
+ # define crc32_combine z_crc32_combine
+ # define crc32_combine64 z_crc32_combine64
++# define crc32_combine_gen z_crc32_combine_gen
++# define crc32_combine_gen64 z_crc32_combine_gen64
++# define crc32_combine_op z_crc32_combine_op
+ # define crc32_z z_crc32_z
+ # define deflate z_deflate
+ # define deflateBound z_deflateBound
+@@ -136,6 +142,7 @@
# endif
# define zlibCompileFlags z_zlibCompileFlags
# define zlibVersion z_zlibVersion
@@ -62,7 +72,7 @@ diff -ruN orig/zconf.h src/zconf.h
/* all zlib typedefs in zlib.h and zconf.h */
# define Byte z_Byte
-@@ -431,7 +435,7 @@
+@@ -431,7 +438,7 @@
typedef unsigned long z_crc_t;
#endif
diff --git a/src/3rdparty/zlib/src/zconf.h b/src/3rdparty/zlib/src/zconf.h
index afd234fa54..837f7bcc57 100644
--- a/src/3rdparty/zlib/src/zconf.h
+++ b/src/3rdparty/zlib/src/zconf.h
@@ -41,6 +41,9 @@
# define crc32 z_crc32
# define crc32_combine z_crc32_combine
# define crc32_combine64 z_crc32_combine64
+# define crc32_combine_gen z_crc32_combine_gen
+# define crc32_combine_gen64 z_crc32_combine_gen64
+# define crc32_combine_op z_crc32_combine_op
# define crc32_z z_crc32_z
# define deflate z_deflate
# define deflateBound z_deflateBound