From 5886b86582d24be1f32636a73b4ee9459e108366 Mon Sep 17 00:00:00 2001 From: Philippe Daouadi Date: Tue, 9 Jun 2015 09:52:49 +0200 Subject: [PATCH] Add compatibility with old #defines --- libarchive/archive.h | 8 ++++++++ libarchive/archive_entry.h | 7 +++++++ 2 files changed, 15 insertions(+) diff --git a/libarchive/archive.h b/libarchive/archive.h index 98397a93e..540aeaca4 100644 --- a/libarchive/archive.h +++ b/libarchive/archive.h @@ -45,6 +45,14 @@ # include #endif +#if ARCHIVE_VERSION_NUMBER < 4000000 +// also defined in archive_entry.h, don't redefine +#if !defined(__LA_INT64_T) +#define __LA_INT64_T la_int64_t +#endif +#define __LA_SSIZE_T la_ssize_t +#endif + /* Get appropriate definitions of standard POSIX-style types. */ /* These should match the types used in 'struct stat' */ #if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__WATCOMC__) diff --git a/libarchive/archive_entry.h b/libarchive/archive_entry.h index b42fad6d5..21a0f30fd 100644 --- a/libarchive/archive_entry.h +++ b/libarchive/archive_entry.h @@ -47,6 +47,13 @@ #include #endif +#if ARCHIVE_VERSION_NUMBER < 4000000 +// also defined in archive.h, don't redefine +#if !defined(__LA_INT64_T) +#define __LA_INT64_T la_int64_t +#endif +#endif + /* Get a suitable 64-bit integer type. */ #if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__WATCOMC__) typedef __int64 la_int64_t; -- 2.47.2