aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPer Øyvind Karlsen <peroyvind@mandriva.org>2008-10-10 09:14:06 +0000
committerPer Øyvind Karlsen <peroyvind@mandriva.org>2008-10-10 09:14:06 +0000
commit9b1e86da147c226e37cac6969efe25b105e5d1da (patch)
tree50c022f0b34dce3ef92040d222f96bf58d49f89e
parent9c8a9a486d8ce2f2ca76f27412a8a3137316fa64 (diff)
downloadperl-URPM-9b1e86da147c226e37cac6969efe25b105e5d1da.tar
perl-URPM-9b1e86da147c226e37cac6969efe25b105e5d1da.tar.gz
perl-URPM-9b1e86da147c226e37cac6969efe25b105e5d1da.tar.bz2
perl-URPM-9b1e86da147c226e37cac6969efe25b105e5d1da.tar.xz
perl-URPM-9b1e86da147c226e37cac6969efe25b105e5d1da.zip
fix build with rpm5.org HEAD
-rw-r--r--URPM.xs16
1 files 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 <rpm/rpm4compat.h>
+#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 <rpm/rpmevr.h>
#endif
-#if RPM_VERSION_CODE >= RPM_VERSION(5,0,0)
-#include <rpm/rpm4compat.h>
-#else
#include <rpm/rpmlib.h>
#include <rpm/header.h>
@@ -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: