From: Fabian Pfitzner <f.pfitzner@pengutronix.de>
To: ptxdist@pengutronix.de
Cc: Fabian Pfitzner <f.pfitzner@pengutronix.de>
Subject: [ptxdist] [PATCH] qt5: build zlib with time64 support
Date: Wed, 7 May 2025 16:33:45 +0200 [thread overview]
Message-ID: <20250507143344.4118510-1-f.pfitzner@pengutronix.de> (raw)
The zlib third party module provided by qt 5.15.16 does not use time_t,
so building zlib with _TIME_BITS enabled causes compiler issues. The upstream
zlib repository already has a patch that fixes this issues. Import it to
resolve the issue.
Signed-off-by: Fabian Pfitzner <f.pfitzner@pengutronix.de>
---
.../0600-undefine-_TIME_BITS.patch | 30 +++++++++++++++++++
.../series | 4 ++-
2 files changed, 33 insertions(+), 1 deletion(-)
create mode 100644 patches/qt-everywhere-opensource-src-5.15.16/0600-undefine-_TIME_BITS.patch
diff --git a/patches/qt-everywhere-opensource-src-5.15.16/0600-undefine-_TIME_BITS.patch b/patches/qt-everywhere-opensource-src-5.15.16/0600-undefine-_TIME_BITS.patch
new file mode 100644
index 000000000..f19c6a151
--- /dev/null
+++ b/patches/qt-everywhere-opensource-src-5.15.16/0600-undefine-_TIME_BITS.patch
@@ -0,0 +1,30 @@
+From: Fabian Pfitzner <f.pfitzner@pengutronix.de>
+Date: Wed, 7 May 2025 14:00:26 +0200
+Subject: [PATCH] undefine _TIME_BITS
+
+zlib does not use time_t, so _TIME_BITS is irrelevant.
+This was already fixed in the upstream zlib repo [1].
+
+[1] https://github.com/madler/zlib/commit/a566e156b3fa07b566ddbf6801b517a9dba04fa3
+
+Signed-off-by: Fabian Pfitzner <f.pfitzner@pengutronix.de>
+---
+ qtwebengine/src/3rdparty/chromium/third_party/zlib/gzguts.h | 5 ++---
+ 1 file changed, 2 insertions(+), 3 deletions(-)
+
+diff --git a/qtwebengine/src/3rdparty/chromium/third_party/zlib/gzguts.h b/qtwebengine/src/3rdparty/chromium/third_party/zlib/gzguts.h
+index 57faf37165a3..d2057e40bcea 100644
+--- a/qtwebengine/src/3rdparty/chromium/third_party/zlib/gzguts.h
++++ b/qtwebengine/src/3rdparty/chromium/third_party/zlib/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
diff --git a/patches/qt-everywhere-opensource-src-5.15.16/series b/patches/qt-everywhere-opensource-src-5.15.16/series
index a8f77806b..b1088ce9f 100644
--- a/patches/qt-everywhere-opensource-src-5.15.16/series
+++ b/patches/qt-everywhere-opensource-src-5.15.16/series
@@ -22,4 +22,6 @@
0402-HACK-qtwebengine-workaround-for-too-long-file-names.patch
#tag:kms --start-number 500
0500-eglfs_kms-device-ordering-robustness.patch
-# 544d9b0673000ed50ea790699663a6c7 - git-ptx-patches magic
+#tag:time64 --start-number 600
+0600-undefine-_TIME_BITS.patch
+# ce289d22eb7c2f55726ff2f0e24cb65f - git-ptx-patches magic
--
2.39.5
reply other threads:[~2025-05-07 14:38 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250507143344.4118510-1-f.pfitzner@pengutronix.de \
--to=f.pfitzner@pengutronix.de \
--cc=ptxdist@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox