From e6aa740fd1cdddfcf6b2df6be7334f93366e1cce Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Wed, 1 Nov 2017 01:30:39 +0100 Subject: restore rpm-4.13.x compatibility --- URPM.xs | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'URPM.xs') diff --git a/URPM.xs b/URPM.xs index 8926770..ef3254b 100644 --- a/URPM.xs +++ b/URPM.xs @@ -11,6 +11,7 @@ #include "EXTERN.h" #include "perl.h" #include "XSUB.h" +#include "rpmversion.h" #include #include @@ -2990,6 +2991,11 @@ Urpm_parse_hdlist__XS(urpm, filename, ...) } else croak("first argument should contain a depslist ARRAY reference"); } else croak("first argument should be a reference to a HASH"); + +#ifndef RPM4_14_0 +#define RPMVSF_NOPAYLOAD RPMVSF_NOSHA1 +#define RPMVSF_NOSHA256HEADER RPMVSF_NOMD5HEADER +#endif void Urpm_parse_rpm(urpm, filename, ...) SV *urpm @@ -3117,7 +3123,11 @@ Urpm_get_gpg_fingerprint(filename) pktlen = 0; else { unsigned int i; +#ifdef RPM4_14_0 pgpPubkeyKeyID (pkt, pktlen, fingerprint); +#else + pgpPubkeyFingerprint (pkt, pktlen, fingerprint); +#endif for (i = 0; i < sizeof (pgpKeyID_t); i++) sprintf(&fingerprint_str[i*2], "%02x", fingerprint[i]); } -- cgit v1.2.1