mirror of
https://github.com/ostreedev/ostree.git
synced 2024-10-26 17:25:36 +03:00
repo: Use non-deprecated API with sufficiently new libarchive
Based on a patch Tobias Hunger <tobias.hunger@gmail.com>
This commit is contained in:
parent
2a14f2cd52
commit
23e2593b6d
@ -100,6 +100,10 @@ AS_IF([ test x$with_libarchive != xno ], [
|
||||
AS_IF([ test x$have_libarchive = xyes], [
|
||||
AC_DEFINE(HAVE_LIBARCHIVE, 1, [Define if we have libarchive.pc])
|
||||
PKG_CHECK_MODULES(OT_DEP_LIBARCHIVE, $LIBARCHIVE_DEPENDENCY)
|
||||
save_LIBS=$LIBS
|
||||
LIBS=$OT_DEP_LIBARCHIVE_LIBS
|
||||
AC_CHECK_FUNCS(archive_read_support_filter_all)
|
||||
LIBS=$save_LIBS
|
||||
with_libarchive=yes
|
||||
], [
|
||||
with_libarchive=no
|
||||
|
@ -305,7 +305,11 @@ ostree_repo_stage_archive_to_mtree (OstreeRepo *self,
|
||||
gs_free guchar *tmp_csum = NULL;
|
||||
|
||||
a = archive_read_new ();
|
||||
#ifdef HAVE_ARCHIVE_READ_SUPPORT_FILTER_ALL
|
||||
archive_read_support_filter_all (a);
|
||||
#else
|
||||
archive_read_support_compression_all (a);
|
||||
#endif
|
||||
archive_read_support_format_all (a);
|
||||
if (archive_read_open_filename (a, gs_file_get_path_cached (archive_f), 8192) != ARCHIVE_OK)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user