diff options
author | Per Øyvind Karlsen <peroyvind@mandriva.org> | 2008-07-18 14:01:27 +0000 |
---|---|---|
committer | Per Øyvind Karlsen <peroyvind@mandriva.org> | 2008-07-18 14:01:27 +0000 |
commit | b45a5c47e210cf5795e5b3206e725f0c4ca428c2 (patch) | |
tree | 995270db5304f4a67bbd3f736806d016ca08614e | |
parent | 42b8201a89325abb266d3d2020e4b3d2c9660000 (diff) | |
download | rpmtools-b45a5c47e210cf5795e5b3206e725f0c4ca428c2.tar rpmtools-b45a5c47e210cf5795e5b3206e725f0c4ca428c2.tar.gz rpmtools-b45a5c47e210cf5795e5b3206e725f0c4ca428c2.tar.bz2 rpmtools-b45a5c47e210cf5795e5b3206e725f0c4ca428c2.tar.xz rpmtools-b45a5c47e210cf5795e5b3206e725f0c4ca428c2.zip |
fix version detection and header inclusion with rpm5.org
-rw-r--r-- | rpm2header.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/rpm2header.c b/rpm2header.c index e51cb9b..b8c2cb4 100644 --- a/rpm2header.c +++ b/rpm2header.c @@ -6,10 +6,13 @@ #include <fcntl.h> #include <unistd.h> #include <stdint.h> -#include <rpmlib.h> -#if defined(RPM_FORMAT_VERSION) && RPM_FORMAT_VERSION >= 5 + +#define RPM_VERSION(maj,min,pl) (((maj) << 16) + ((min) << 8) + (pl)) + +#if RPM_VERSION_CODE >= RPM_VERSION(5,0,0) #include <rpm/rpm4compat.h> #endif +#include <rpmlib.h> #include <rpm/rpmts.h> const char *basename(const char *f) { |