mirror of https://github.com/bitcoin/bitcoin
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:
a566e156b3
.patch
Closes #29980.
pull/29985/head
parent
3aaf7328eb
commit
2e266f33b5
@ -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
|
Loading…
Reference in new issue