aboutsummaryrefslogtreecommitdiffstats
path: root/URPM.xs
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2006-06-01 11:47:46 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2006-06-01 11:47:46 +0000
commite9f93aa1ade286d86c244c3b3333e4ce5f360fd6 (patch)
tree2155082676c54e99bde960a306029012abcddbfc /URPM.xs
parentc02c5a34994abc26925269d2ecb5737a6c32292f (diff)
downloadperl-URPM-e9f93aa1ade286d86c244c3b3333e4ce5f360fd6.tar
perl-URPM-e9f93aa1ade286d86c244c3b3333e4ce5f360fd6.tar.gz
perl-URPM-e9f93aa1ade286d86c244c3b3333e4ce5f360fd6.tar.bz2
perl-URPM-e9f93aa1ade286d86c244c3b3333e4ce5f360fd6.tar.xz
perl-URPM-e9f93aa1ade286d86c244c3b3333e4ce5f360fd6.zip
It's nice to be able to compile with rpm 4.4.6, but it's nice to be able to
compile with older rpms too.
Diffstat (limited to 'URPM.xs')
-rw-r--r--URPM.xs11
1 files changed, 8 insertions, 3 deletions
diff --git a/URPM.xs b/URPM.xs
index bf56235..d590a6a 100644
--- a/URPM.xs
+++ b/URPM.xs
@@ -26,7 +26,9 @@
#undef Fflush
#undef Mkdir
#undef Stat
-#define _RPMPS_INTERNAL
+#ifdef RPM_446
+# define _RPMPS_INTERNAL
+#endif
#include <rpm/rpmlib.h>
#include <rpm/header.h>
#include <rpm/rpmio.h>
@@ -2820,7 +2822,6 @@ Trans_add(trans, pkg, ...)
if ((pkg->flag & FLAG_ID) <= FLAG_ID_MAX && pkg->h != NULL) {
int update = 0;
rpmRelocation *relocations = NULL;
- rpmRelocation relptr = NULL;
/* compability mode with older interface of add */
if (items == 3) {
update = SvIV(ST(2));
@@ -2840,8 +2841,12 @@ Trans_add(trans, pkg, ...)
while (--j >= 0) {
SV **e = av_fetch(excludepath, j, 0);
if (e != NULL && *e != NULL) {
- relptr = *(relocations + j);
+#ifdef RPM_446
+ rpmRelocation relptr = relocations[j];
relptr->oldPath = SvPV_nolen(*e);
+#else
+ relocations[j].oldPath = SvPV_nolen(*e);
+#endif
}
}
}