summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--programs/lz4io.c4
-rw-r--r--programs/platform.h3
2 files changed, 4 insertions, 3 deletions
diff --git a/programs/lz4io.c b/programs/lz4io.c
index 506d661..a69b80f 100644
--- a/programs/lz4io.c
+++ b/programs/lz4io.c
@@ -53,7 +53,9 @@
#include "lz4hc.h" /* still required for legacy format */
#include "lz4frame.h"
-
+#if !defined(__64BIT__) && (PLATFORM_POSIX_VERSION >= 200112L) /* No point defining Large file for 64 bit */
+# define fseek fseeko
+#endif
/*****************************
* Constants
diff --git a/programs/platform.h b/programs/platform.h
index 244b2d8..e983756 100644
--- a/programs/platform.h
+++ b/programs/platform.h
@@ -41,7 +41,7 @@ extern "C" {
***************************************************************/
#if !defined(_WIN32) && (defined(__unix__) || defined(__unix) || (defined(__APPLE__) && defined(__MACH__)) \
|| defined(__midipix__) || defined(__VMS)) /* UNIX-like OS */
-# if (defined(__APPLE__) && defined(__MACH__)) || defined(__SVR4) || defined(_AIX) || defined(__hpux)
+# if (defined(__APPLE__) && defined(__MACH__)) || defined(__SVR4) || defined(_AIX) || defined(__hpux) \
|| defined(__DragonFly__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) /* POSIX.1–2001 (SUSv3) conformant */
# define PLATFORM_POSIX_VERSION 200112L
# else
@@ -105,7 +105,6 @@ extern "C" {
# if defined(_AIX) || defined(__hpux)
# define _LARGE_FILES /* Large file support on 32-bits AIX and HP-UX */
# endif
-# define fseek fseeko
#endif