diff options
author | merge-script <fanquake@gmail.com> | 2024-04-30 14:19:35 +0800 |
---|---|---|
committer | merge-script <fanquake@gmail.com> | 2024-04-30 14:19:35 +0800 |
commit | ad42d63519839b5751db0f294b5de7cfdc332e61 (patch) | |
tree | e180dfa782fb0a88611338992761234738fabd59 /depends/patches/qt | |
parent | 19865a8350a8181ab658bef48976a728bae6a8bd (diff) | |
parent | 2e266f33b5d2be5c233c2c692481f75785714fa1 (diff) |
Merge bitcoin/bitcoin#29985: depends: Fix build of Qt for 32-bit platforms with recent glibc
2e266f33b5d2be5c233c2c692481f75785714fa1 depends: Fix build of Qt for 32-bit platforms (laanwj)
Pull request description:
The 32 to 64-bit `time_t` transition causes a build failure in the built-in zlib about conflicting `_TIME_BITS` and `_FILE_OFFSET_BITS`.
Note that zlib doesn't use `time_t` at all, so it is a false alarm.
Take the following patch from upstream zlib:
https://github.com/madler/zlib/commit/a566e156b3fa07b566ddbf6801b517a9dba04fa3.patch
Closes #29980.
ACKs for top commit:
hebasto:
re-ACK 2e266f33b5d2be5c233c2c692481f75785714fa1.
fanquake:
ACK 2e266f33b5d2be5c233c2c692481f75785714fa1 - at some point qt's open source 5.15.x branch will catch up to where they bumped the internal zlib to >= 1.3 (which contains this change), and we'll be able to drop this patch. Checked that it fixes the build issue in the interim.
Tree-SHA512: b297aed8b299c671ff439b5b7b410832ff5004fd9b13c3b4a5fb5bde9dcf24a5eda08cd0a39565ae0641d9533711142bdc2889a32d343b9c4b41bfac24f0ca28
Diffstat (limited to 'depends/patches/qt')
-rw-r--r-- | depends/patches/qt/zlib-timebits64.patch | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/depends/patches/qt/zlib-timebits64.patch b/depends/patches/qt/zlib-timebits64.patch new file mode 100644 index 0000000000..139c1dfa77 --- /dev/null +++ b/depends/patches/qt/zlib-timebits64.patch @@ -0,0 +1,31 @@ +From a566e156b3fa07b566ddbf6801b517a9dba04fa3 Mon Sep 17 00:00:00 2001 +From: Mark Adler <madler@alumni.caltech.edu> +Date: Sat, 29 Jul 2023 22:13:09 -0700 +Subject: [PATCH] Avoid compiler complaints if _TIME_BITS defined when building + zlib. + +zlib does not use time_t, so _TIME_BITS is irrelevant. However it +may be defined anyway as part of a sledgehammer indiscriminately +applied to all builds. + +From https://github.com/madler/zlib/commit/a566e156b3fa07b566ddbf6801b517a9dba04fa3.patch +--- + qtbase/src/3rdparty/zlib/src/gzguts.h | 5 ++--- + 1 file changed, 2 insertions(+), 3 deletions(-) + +diff --git a/qtbase/src/3rdparty/zlib/src/gzguts.h b/qtbase/src/3rdparty/zlib/src/gzguts.h +index e23f831f5..f9375047e 100644 +--- a/qtbase/src/3rdparty/zlib/src/gzguts.h ++++ b/qtbase/src/3rdparty/zlib/src/gzguts.h +@@ -26,9 +26,8 @@ + # ifndef _LARGEFILE_SOURCE + # define _LARGEFILE_SOURCE 1 + # endif +-# ifdef _FILE_OFFSET_BITS +-# undef _FILE_OFFSET_BITS +-# endif ++# undef _FILE_OFFSET_BITS ++# undef _TIME_BITS + #endif + + #ifdef HAVE_HIDDEN |