diff options
author | Per Øyvind Karlsen <peroyvind@mandriva.org> | 2008-07-14 16:49:08 +0000 |
---|---|---|
committer | Per Øyvind Karlsen <peroyvind@mandriva.org> | 2008-07-14 16:49:08 +0000 |
commit | 86419fe6b51fed42da704092c42a36399b0391a6 (patch) | |
tree | 0964230482b5409d515e4c1f250c5b52cde6f11f | |
parent | 724f619c39ab45497b7a8cdaf568c37c34926a16 (diff) | |
download | perl-URPM-86419fe6b51fed42da704092c42a36399b0391a6.tar perl-URPM-86419fe6b51fed42da704092c42a36399b0391a6.tar.gz perl-URPM-86419fe6b51fed42da704092c42a36399b0391a6.tar.bz2 perl-URPM-86419fe6b51fed42da704092c42a36399b0391a6.tar.xz perl-URPM-86419fe6b51fed42da704092c42a36399b0391a6.zip |
fix build with rpm5.org HEAD
-rw-r--r-- | URPM.xs | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -26,6 +26,7 @@ #undef Fflush #undef Mkdir #undef Stat +#undef Fstat #define RPM_VERSION(maj,min,pl) (((maj) << 16) + ((min) << 8) + (pl)) @@ -1263,10 +1264,18 @@ update_header(char *filename, URPM__Package pkg, int keep_all_tags, int vsflags) rpmtsSetVSFlags(ts, _RPMVSF_NOSIGNATURES | vsflags); if (fd != NULL && rpmReadPackageFile(ts, fd, filename, &header) == 0 && header) { char *basename; +#if RPM_VERSION_CODE >= RPM_VERSION(5,2,0) + struct stat sb; +#else int_32 size; +#endif basename = strrchr(filename, '/'); +#if RPM_VERSION_CODE >= RPM_VERSION(5,2,0) + Fstat(fd, &sb); +#else size = fdSize(fd); +#endif Fclose(fd); /* this is only kept for compatibility with older distros |