aboutsummaryrefslogtreecommitdiffstats
path: root/URPM.xs
diff options
context:
space:
mode:
Diffstat (limited to 'URPM.xs')
-rw-r--r--URPM.xs11
1 files changed, 5 insertions, 6 deletions
diff --git a/URPM.xs b/URPM.xs
index d0f6405..8286e08 100644
--- a/URPM.xs
+++ b/URPM.xs
@@ -2669,7 +2669,11 @@ Trans_add(trans, pkg, ...)
CODE:
if ((pkg->flag & FLAG_ID) <= FLAG_ID_MAX && pkg->h != NULL) {
int update = 0;
+#ifdef RPM_446
+ rpmRelocation relocations = NULL;
+#else
rpmRelocation *relocations = NULL;
+#endif
/* compability mode with older interface of add */
if (items == 3) {
update = SvIV(ST(2));
@@ -2689,19 +2693,14 @@ Trans_add(trans, pkg, ...)
while (--j >= 0) {
SV **e = av_fetch(excludepath, j, 0);
if (e != NULL && *e != NULL) {
-#ifdef RPM_446
- rpmRelocation relptr = relocations[j];
- relptr->oldPath = SvPV_nolen(*e);
-#else
relocations[j].oldPath = SvPV_nolen(*e);
-#endif
}
}
}
}
}
}
- RETVAL = rpmtsAddInstallElement(trans->ts, pkg->h, (fnpyKey)(1+(pkg->flag & FLAG_ID)), update, *relocations) == 0;
+ RETVAL = rpmtsAddInstallElement(trans->ts, pkg->h, (fnpyKey)(1+(pkg->flag & FLAG_ID)), update, relocations) == 0;
/* free allocated memory, check rpm is copying it just above, at least in 4.0.4 */
free(relocations);
} else RETVAL = 0;