summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Olbrich <m.olbrich@pengutronix.de>2023-06-06 14:38:11 +0200
committerMichael Olbrich <m.olbrich@pengutronix.de>2023-06-06 14:41:34 +0200
commit094b78e0ad0dac5ab43a5e684215605c03bdbcd1 (patch)
tree1949f4b4fb68f060e6b794be8679115473c049d7
parent4cc324091da66f0c8dc426f5954c230e42554694 (diff)
downloadptxdist-094b78e0ad0dac5ab43a5e684215605c03bdbcd1.tar.gz
ptxdist-094b78e0ad0dac5ab43a5e684215605c03bdbcd1.tar.xz
zlib: fix building with Y2038 support
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
-rw-r--r--patches/zlib-1.2.13/0001-Do-not-undefine-_FILE_OFFSET_BITS-when-_LARGEFILE64_.patch33
-rw-r--r--patches/zlib-1.2.13/series4
2 files changed, 37 insertions, 0 deletions
diff --git a/patches/zlib-1.2.13/0001-Do-not-undefine-_FILE_OFFSET_BITS-when-_LARGEFILE64_.patch b/patches/zlib-1.2.13/0001-Do-not-undefine-_FILE_OFFSET_BITS-when-_LARGEFILE64_.patch
new file mode 100644
index 000000000..d67f39093
--- /dev/null
+++ b/patches/zlib-1.2.13/0001-Do-not-undefine-_FILE_OFFSET_BITS-when-_LARGEFILE64_.patch
@@ -0,0 +1,33 @@
+From: Michael Olbrich <m.olbrich@pengutronix.de>
+Date: Mon, 5 Jun 2023 16:19:12 +0200
+Subject: [PATCH] Do not undefine _FILE_OFFSET_BITS when _LARGEFILE64_SOURCE is
+ defined
+
+This ends up causing 64bit time_t to fail the build because it needs 64
+bit off_t.
+
+Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
+---
+ gzguts.h | 9 ---------
+ 1 file changed, 9 deletions(-)
+
+diff --git a/gzguts.h b/gzguts.h
+index 57faf37165a3..3747f3c449d2 100644
+--- a/gzguts.h
++++ b/gzguts.h
+@@ -3,15 +3,6 @@
+ * For conditions of distribution and use, see copyright notice in zlib.h
+ */
+
+-#ifdef _LARGEFILE64_SOURCE
+-# ifndef _LARGEFILE_SOURCE
+-# define _LARGEFILE_SOURCE 1
+-# endif
+-# ifdef _FILE_OFFSET_BITS
+-# undef _FILE_OFFSET_BITS
+-# endif
+-#endif
+-
+ #ifdef HAVE_HIDDEN
+ # define ZLIB_INTERNAL __attribute__((visibility ("hidden")))
+ #else
diff --git a/patches/zlib-1.2.13/series b/patches/zlib-1.2.13/series
new file mode 100644
index 000000000..5d1de9562
--- /dev/null
+++ b/patches/zlib-1.2.13/series
@@ -0,0 +1,4 @@
+# generated by git-ptx-patches
+#tag:base --start-number 1
+0001-Do-not-undefine-_FILE_OFFSET_BITS-when-_LARGEFILE64_.patch
+# b97b2081b504f9c818c2144cf5384d77 - git-ptx-patches magic