summaryrefslogtreecommitdiffstats
path: root/lib/libalpm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libalpm')
-rw-r--r--lib/libalpm/libarchive-compat.h20
1 files changed, 0 insertions, 20 deletions
diff --git a/lib/libalpm/libarchive-compat.h b/lib/libalpm/libarchive-compat.h
index 0ff005ae..596fd664 100644
--- a/lib/libalpm/libarchive-compat.h
+++ b/lib/libalpm/libarchive-compat.h
@@ -24,48 +24,28 @@
static inline int _alpm_archive_read_free(struct archive *archive)
{
-#if ARCHIVE_VERSION_NUMBER >= 3000000
return archive_read_free(archive);
-#else
- return archive_read_finish(archive);
-#endif
}
static inline int64_t _alpm_archive_compressed_ftell(struct archive *archive)
{
-#if ARCHIVE_VERSION_NUMBER >= 3000000
return archive_filter_bytes(archive, -1);
-#else
- return archive_position_compressed(archive);
-#endif
}
static inline int _alpm_archive_read_open_file(struct archive *archive,
const char *filename, size_t block_size)
{
-#if ARCHIVE_VERSION_NUMBER >= 3000000
return archive_read_open_filename(archive, filename, block_size);
-#else
- return archive_read_open_file(archive, filename, block_size);
-#endif
}
static inline int _alpm_archive_filter_code(struct archive *archive)
{
-#if ARCHIVE_VERSION_NUMBER >= 3000000
return archive_filter_code(archive, 0);
-#else
- return archive_compression(archive);
-#endif
}
static inline int _alpm_archive_read_support_filter_all(struct archive *archive)
{
-#if ARCHIVE_VERSION_NUMBER >= 3000000
return archive_read_support_filter_all(archive);
-#else
- return archive_read_support_compression_all(archive);
-#endif
}
#endif /* LIBARCHIVE_COMPAT_H */