2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-29 21:38:05 +00:00

Define _LARGEFILE64_SOURCE if _FILE_OFFSET_BITS == 64.

Fixes a -Wwrite-strings warning on 32-bit systems.
This commit is contained in:
Todd C. Miller 2022-06-29 16:59:50 -06:00
parent 50813f8160
commit 3badff39ca

View File

@ -20,9 +20,9 @@
/* /*
* Configure does not define _LARGEFILE64_SOURCE by default. * 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 # ifndef _LFS64_LARGEFILE
# define _LFS64_LARGEFILE 1 # define _LFS64_LARGEFILE 1
# endif # endif