Fix AIX errors/warnings
authorNorm Green <norm.green@gemtalksystems.com>
Wed, 17 Apr 2019 16:20:09 +0000 (09:20 -0700)
committerNorm Green <norm.green@gemtalksystems.com>
Wed, 17 Apr 2019 16:20:09 +0000 (09:20 -0700)
lib/lz4.c
tests/fuzzer.c

index 693bdaf..bd8fa11 100644 (file)
--- a/lib/lz4.c
+++ b/lib/lz4.c
 #  define LZ4_SRC_INCLUDED 1
 #endif
 
+#ifndef LZ4_STATIC_LINKING_ONLY
 #define LZ4_STATIC_LINKING_ONLY
+#endif
+
+#ifndef LZ4_DISABLE_DEPRECATE_WARNINGS
 #define LZ4_DISABLE_DEPRECATE_WARNINGS /* due to LZ4_decompress_safe_withPrefix64k */
+#endif
+
 #include "lz4.h"
 /* see also "memory routines" below */
 
index 3128e6d..68e2232 100644 (file)
 #include <assert.h>
 #include <limits.h>     /* INT_MAX */
 
+#if defined(_AIX)
+#  include <sys/mman.h>   /* mmap */
+#endif
+
 #define LZ4_DISABLE_DEPRECATE_WARNINGS   /* LZ4_decompress_fast */
 #define LZ4_STATIC_LINKING_ONLY
 #include "lz4.h"