Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
depends: Fix build of Qt for 32-bit platforms
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.
- Loading branch information
Showing
2 changed files
with
33 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
@@ -7,9 +7,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 |