bin/xbps-rindex: drop libarchive compat macros

Closes: #411 [via git-merge-pr]
This commit is contained in:
Duncan Overbruck 2021-06-25 18:04:57 +02:00
parent 2dc22401d5
commit a8d095a2ba
No known key found for this signature in database
GPG Key ID: 335C1D17EC3D6E35
2 changed files with 1 additions and 33 deletions

View File

@ -638,7 +638,7 @@ write_entry(struct archive *ar, struct archive_entry *entry)
if ((target = archive_entry_pathname(entry)) == NULL) if ((target = archive_entry_pathname(entry)) == NULL)
return; return;
if (archive_write_header(ar, entry)) if (archive_write_header(ar, entry) != ARCHIVE_OK)
die_archive(ar, "cannot write %s to archive:", target); die_archive(ar, "cannot write %s to archive:", target);
/* Only regular files can have data. */ /* Only regular files can have data. */

View File

@ -28,38 +28,6 @@
#include <xbps.h> #include <xbps.h>
/* 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_write_set_compression_gzip(x) \
archive_write_add_filter_gzip(x)
#define archive_write_set_compression_bzip2(x) \
archive_write_add_filter_bzip2(x)
#define archive_write_set_compression_xz(x) \
archive_write_add_filter_xz(x)
#define archive_read_finish(x) \
archive_read_free(x)
#define archive_write_finish(x) \
archive_write_free(x)
#define archive_compression_name(x) \
archive_filter_name(x, 0)
#endif
#define _XBPS_RINDEX "xbps-rindex" #define _XBPS_RINDEX "xbps-rindex"
/* From index-add.c */ /* From index-add.c */