diff options
author | Olivier Thauvin <nanardon@mandriva.org> | 2006-05-31 21:10:12 +0000 |
---|---|---|
committer | Olivier Thauvin <nanardon@mandriva.org> | 2006-05-31 21:10:12 +0000 |
commit | c02c5a34994abc26925269d2ecb5737a6c32292f (patch) | |
tree | c321b09b0caaac6097a6a0dc07dcf581a7370669 /URPM.xs | |
parent | 6e1465a3c756207c46ffd4fa4914e685cba9c669 (diff) | |
download | perl-URPM-c02c5a34994abc26925269d2ecb5737a6c32292f.tar perl-URPM-c02c5a34994abc26925269d2ecb5737a6c32292f.tar.gz perl-URPM-c02c5a34994abc26925269d2ecb5737a6c32292f.tar.bz2 perl-URPM-c02c5a34994abc26925269d2ecb5737a6c32292f.tar.xz perl-URPM-c02c5a34994abc26925269d2ecb5737a6c32292f.zip |
- rpm 4.4.6 fixes
Diffstat (limited to 'URPM.xs')
-rw-r--r-- | URPM.xs | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -26,6 +26,7 @@ #undef Fflush #undef Mkdir #undef Stat +#define _RPMPS_INTERNAL #include <rpm/rpmlib.h> #include <rpm/header.h> #include <rpm/rpmio.h> @@ -2819,6 +2820,7 @@ 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)); @@ -2838,14 +2840,15 @@ Trans_add(trans, pkg, ...) while (--j >= 0) { SV **e = av_fetch(excludepath, j, 0); if (e != NULL && *e != NULL) { - relocations[j].oldPath = SvPV_nolen(*e); + relptr = *(relocations + j); + relptr->oldPath = SvPV_nolen(*e); } } } } } } - RETVAL = rpmtsAddInstallElement(trans->ts, pkg->h, (void *)(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; |