summaryrefslogtreecommitdiffstats
path: root/lib/libalpm/be_package.c
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2013-01-29 02:23:25 +0100
committerAllan McRae <allan@archlinux.org>2013-01-29 04:37:32 +0100
commite1e4bbb79ddd23e46b8d3a01168f4eb410308d5b (patch)
treeaf5e7d24e30a953b3e1e46a76e0b90804a12ebe6 /lib/libalpm/be_package.c
parent2a57c2068c3ea744608c364f9cacedd3f0c14849 (diff)
downloadpacman-e1e4bbb79ddd23e46b8d3a01168f4eb410308d5b.tar.gz
pacman-e1e4bbb79ddd23e46b8d3a01168f4eb410308d5b.tar.xz
Use libarchive compat header for relevant symbols
Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'lib/libalpm/be_package.c')
-rw-r--r--lib/libalpm/be_package.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/libalpm/be_package.c b/lib/libalpm/be_package.c
index 18fc14af..cc430b17 100644
--- a/lib/libalpm/be_package.c
+++ b/lib/libalpm/be_package.c
@@ -32,6 +32,7 @@
/* libalpm */
#include "alpm_list.h"
#include "alpm.h"
+#include "libarchive-compat.h"
#include "util.h"
#include "log.h"
#include "handle.h"
@@ -74,7 +75,7 @@ static void *_package_changelog_open(alpm_pkg_t *pkg)
changelog = malloc(sizeof(struct package_changelog));
if(!changelog) {
pkg->handle->pm_errno = ALPM_ERR_MEMORY;
- archive_read_finish(archive);
+ _alpm_archive_read_free(archive);
CLOSE(fd);
return NULL;
}
@@ -84,7 +85,7 @@ static void *_package_changelog_open(alpm_pkg_t *pkg)
}
}
/* we didn't find a changelog */
- archive_read_finish(archive);
+ _alpm_archive_read_free(archive);
CLOSE(fd);
errno = ENOENT;
@@ -124,7 +125,7 @@ static int _package_changelog_close(const alpm_pkg_t UNUSED *pkg, void *fp)
{
int ret;
struct package_changelog *changelog = fp;
- ret = archive_read_finish(changelog->archive);
+ ret = _alpm_archive_read_free(changelog->archive);
CLOSE(changelog->fd);
free(changelog);
return ret;
@@ -471,7 +472,7 @@ alpm_pkg_t *_alpm_pkg_load_internal(alpm_handle_t *handle,
goto pkg_invalid;
}
- archive_read_finish(archive);
+ _alpm_archive_read_free(archive);
CLOSE(fd);
/* internal fields for package struct */
@@ -503,7 +504,7 @@ pkg_invalid:
handle->pm_errno = ALPM_ERR_PKG_INVALID;
error:
_alpm_pkg_free(newpkg);
- archive_read_finish(archive);
+ _alpm_archive_read_free(archive);
if(fd >= 0) {
CLOSE(fd);
}