diff options
-rw-r--r-- | URPM.xs | 8 | ||||
-rw-r--r-- | rpm5compat.h | 5 |
2 files changed, 5 insertions, 8 deletions
@@ -1372,18 +1372,10 @@ update_header(char *filename, URPM__Package pkg, __attribute__((unused)) int kee rpmtsSetVSFlags(ts, _RPMVSF_NOSIGNATURES | vsflags); if (fd != NULL && rpmReadPackageFile(ts, fd, filename, &header) == 0 && header) { char *basename; -#ifndef RPM_ORG struct stat sb; -#else - int32_t size; -#endif basename = strrchr(filename, '/'); -#ifndef RPM_ORG Fstat(fd, &sb); -#else - size = fdSize(fd); -#endif Fclose(fd); /* this is only kept for compatibility with older distros diff --git a/rpm5compat.h b/rpm5compat.h index e98d343..2fbcef2 100644 --- a/rpm5compat.h +++ b/rpm5compat.h @@ -128,4 +128,9 @@ static int rpmEVRcompare(const EVR_t a, const EVR_t b) { return rc; } +static inline int Fstat(FD_t fd, struct stat * st) +{ + return fstat(Fileno(fd), st); +} + #endif /* H_RPM5COMPAT */ |