MSYS2-packages/mingw-w64-cross-zlib/04-fix-largefile-support.patch
Christoph Reiter c8aeaed5dd cross-zlib: Update to 1.3
sync patches with the mingw zlib package
2023-11-11 21:00:03 +01:00

23 lines
672 B
Diff

--- a/zconf.h.in
+++ b/zconf.h.in
@@ -504,7 +504,7 @@
# define z_off_t long
#endif
-#if !defined(_WIN32) && defined(Z_LARGE64)
+#if (defined(_WIN32) && defined(__GNUC__) && defined(_LARGEFILE64_SOURCE)) || defined(Z_LARGE64)
# define z_off64_t off64_t
#else
# if defined(_WIN32) && !defined(__GNUC__) && !defined(Z_SOLO)
--- a/zconf.h.cmakein
+++ b/zconf.h.cmakein
@@ -506,7 +506,7 @@
# define z_off_t long
#endif
-#if !defined(_WIN32) && defined(Z_LARGE64)
+#if (defined(_WIN32) && defined(__GNUC__) && defined(_LARGEFILE64_SOURCE)) || defined(Z_LARGE64)
# define z_off64_t off64_t
#else
# if defined(_WIN32) && !defined(__GNUC__) && !defined(Z_SOLO)