From 86419fe6b51fed42da704092c42a36399b0391a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Per=20=C3=98yvind=20Karlsen?= Date: Mon, 14 Jul 2008 16:49:08 +0000 Subject: fix build with rpm5.org HEAD --- URPM.xs | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'URPM.xs') diff --git a/URPM.xs b/URPM.xs index 679bede..671ede1 100644 --- a/URPM.xs +++ b/URPM.xs @@ -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 -- cgit v1.2.1