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.
This commit is contained in:
Todd C. Miller
2022-06-27 13:02:13 -06:00
parent f5ac1317c4
commit 89666e7c37

View File

@@ -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__)