From 5471c7f46c5717264cfb7f761c29a2cf84bf68cc Mon Sep 17 00:00:00 2001 From: Juan RP Date: Wed, 20 Feb 2013 14:52:01 +0100 Subject: [PATCH] Add libarchive compat definitions for 3.1.2. --- include/xbps_api_impl.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/include/xbps_api_impl.h b/include/xbps_api_impl.h index c5782f4..08987d1 100644 --- include/xbps_api_impl.h +++ include/xbps_api_impl.h @@ -55,6 +55,26 @@ #define __UNCONST(a) ((void *)(unsigned long)(const void *)(a)) #endif +/* libarchive compat */ +#if ARCHIVE_VERSION_NUMBER >= 3000000 + +#define archive_read_support_compression_gzip(x) \ + archive_read_support_filter_gzip(x) + +#define archive_read_support_compression_bzip2(x) \ + archive_read_support_filter_bzip2(x) + +#define archive_read_support_compression_xz(x) \ + archive_read_support_filter_xz(x) + +#define archive_read_finish(x) \ + archive_read_free(x) + +#define archive_compression_name(x) \ + archive_filter_name(x, 0) + +#endif + __BEGIN_DECLS /** -- 1.8.1.1