From 9b1e86da147c226e37cac6969efe25b105e5d1da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Per=20=C3=98yvind=20Karlsen?= Date: Fri, 10 Oct 2008 09:14:06 +0000 Subject: fix build with rpm5.org HEAD --- URPM.xs | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/URPM.xs b/URPM.xs index 2821990..659aad2 100644 --- a/URPM.xs +++ b/URPM.xs @@ -49,6 +49,10 @@ typedef struct rpmSpec_s * Spec; #define rpmProblemGetLong(p) p->ulong1 #endif #endif +#if RPM_VERSION_CODE >= RPM_VERSION(5,0,0) +#include +#else + #if RPM_VERSION_CODE >= RPM_VERSION(4,4,6) # define _RPMPS_INTERNAL #endif @@ -56,9 +60,6 @@ typedef struct rpmSpec_s * Spec; # define _RPMEVR_INTERNAL #include #endif -#if RPM_VERSION_CODE >= RPM_VERSION(5,0,0) -#include -#else #include #include @@ -1324,7 +1325,9 @@ ts_nosignature(rpmts ts) { rpmtsSetVSFlags(ts, _RPMVSF_NODIGESTS | _RPMVSF_NOSIGNATURES); } -#if RPM_VERSION_CODE >= RPM_VERSION(4,4,5) +#if RPM_VERSION_CODE >= RPM_VERSION(5,2,0) +typedef unsigned long long rpmCallbackSize_t; +#elif RPM_VERSION_CODE >= RPM_VERSION(4,4,5) typedef uint64_t rpmCallbackSize_t; #else typedef unsigned long rpmCallbackSize_t; @@ -3790,7 +3793,10 @@ Urpm_import_pubkey_file(db, filename) URPM::DB db char * filename PREINIT: - const byte * pkt = NULL; +#if RPM_VERSION_CODE < RPM_VERSION(5,2,0) + const +#endif + byte * pkt = NULL; size_t pktlen = 0; int rc; CODE: -- cgit v1.2.1