Skip to content

Commit

Permalink
zstd: add ifndef guards for _LARGEFILE_SOURCE
Browse files Browse the repository at this point in the history
This works around a redefinition error on 32-bit Linux. See
facebook/zstd#2443.
  • Loading branch information
indygreg committed Dec 26, 2020
1 parent 55715fc commit fd9b88e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions zstd/zstdlib.c
Original file line number Diff line number Diff line change
Expand Up @@ -79847,9 +79847,13 @@ ZDICT_optimizeTrainFromBuffer_fastCover(
/* Unix Large Files support (>4GB) */
#define _FILE_OFFSET_BITS 64
#if (defined(__sun__) && (!defined(__LP64__))) /* Sun Solaris 32-bits requires specific definitions */
# ifndef _LARGEFILE_SOURCE
# define _LARGEFILE_SOURCE
# endif
#elif ! defined(__LP64__) /* No point defining Large file for 64 bit */
# ifndef _LARGEFILE64_SOURCE
# define _LARGEFILE64_SOURCE
# endif
#endif


Expand Down

0 comments on commit fd9b88e

Please sign in to comment.