From 9e3deaefdbc54910d58dea28d06c2678673c9d09 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Mon, 9 Sep 2019 16:05:07 +0200 Subject: fix building with rpm-4.15 --- RPM4/NEWS | 2 ++ RPM4/src/RPM4.xs | 6 ++++++ 2 files changed, 8 insertions(+) (limited to 'RPM4') diff --git a/RPM4/NEWS b/RPM4/NEWS index c5d556b..84f0433 100644 --- a/RPM4/NEWS +++ b/RPM4/NEWS @@ -1,3 +1,5 @@ +- fix building with rpm-4.15 + Version 0.39 - 18 September 2018 - cpan testers: skip some tests on *BSD & Debian diff --git a/RPM4/src/RPM4.xs b/RPM4/src/RPM4.xs index cd8fa56..3f54b29 100644 --- a/RPM4/src/RPM4.xs +++ b/RPM4/src/RPM4.xs @@ -426,7 +426,13 @@ int _specbuild(rpmSpec spec, SV * sv_buildflags) { if (buildflags == RPMBUILD_NONE) croak("No action given for build"); BTA_t flags = calloc(1, sizeof(*flags)); flags->buildAmount = buildflags; +#if defined(RPM4_15_0) + rpmts ts = rpmtsCreate(); + return rpmSpecBuild(ts, spec, flags); + (void)rpmtsFree(ts); +#else return rpmSpecBuild(spec, flags); +#endif } void _installsrpms(rpmts ts, char * filename) { -- cgit v1.2.1