From 3badff39cae10bba939ab3f61938b98d46f61a4c Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Wed, 29 Jun 2022 16:59:50 -0600 Subject: [PATCH] Define _LARGEFILE64_SOURCE if _FILE_OFFSET_BITS == 64. Fixes a -Wwrite-strings warning on 32-bit systems. --- lib/zlib/zconf.h.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/zlib/zconf.h.in b/lib/zlib/zconf.h.in index 95cb5b818..799e5ffb8 100644 --- a/lib/zlib/zconf.h.in +++ b/lib/zlib/zconf.h.in @@ -20,9 +20,9 @@ /* * Configure does not define _LARGEFILE64_SOURCE by default. - * We need to manually define it on AIX and native 64-bit platforms. + * We need to manually define it on systems that support large files. */ -#if defined (_LARGE_FILES) || defined (__LP64__) +#if defined(__LP64__) || defined(_LARGE_FILES) || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS-0 == 64) # ifndef _LFS64_LARGEFILE # define _LFS64_LARGEFILE 1 # endif