From 89666e7c37ebb17d9df6dfc176c6844d1540dfc0 Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Mon, 27 Jun 2022 13:02:13 -0600 Subject: [PATCH] Define _LFS64_LARGEFILE, _LARGEFILE64_SOURCE if 64-bit or _LARGE_FILES set. autoconf does not define _LARGEFILE64_SOURCE by default but zlib expects it (its own configure script will define it). Fixes a missing prototype for crc32_combine_gen64() on AIX and HP-UX. --- lib/zlib/zconf.h.in | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/lib/zlib/zconf.h.in b/lib/zlib/zconf.h.in index 0b6bd5360..95cb5b818 100644 --- a/lib/zlib/zconf.h.in +++ b/lib/zlib/zconf.h.in @@ -18,6 +18,19 @@ #undef _LARGE_FILES #undef const +/* + * Configure does not define _LARGEFILE64_SOURCE by default. + * We need to manually define it on AIX and native 64-bit platforms. + */ +#if defined (_LARGE_FILES) || defined (__LP64__) +# ifndef _LFS64_LARGEFILE +# define _LFS64_LARGEFILE 1 +# endif +# ifndef _LARGEFILE64_SOURCE +# define _LARGEFILE64_SOURCE 1 +# endif +#endif + /* We build sudo and its libs with -fvisibility=hidden where supported. */ #ifdef HAVE_DSO_VISIBILITY # if defined(__GNUC__)