aboutsummaryrefslogtreecommitdiffstats
path: root/parsehdlist.c
diff options
context:
space:
mode:
authorPer Øyvind Karlsen <peroyvind@mandriva.org>2008-07-18 13:43:12 +0000
committerPer Øyvind Karlsen <peroyvind@mandriva.org>2008-07-18 13:43:12 +0000
commit42b8201a89325abb266d3d2020e4b3d2c9660000 (patch)
treea180bc99f2e39c03b9ac552baaa3cf94555cf5c6 /parsehdlist.c
parent6aa7fd7ee05075b2793445e42d838c281b40ecea (diff)
downloadrpmtools-42b8201a89325abb266d3d2020e4b3d2c9660000.tar
rpmtools-42b8201a89325abb266d3d2020e4b3d2c9660000.tar.gz
rpmtools-42b8201a89325abb266d3d2020e4b3d2c9660000.tar.bz2
rpmtools-42b8201a89325abb266d3d2020e4b3d2c9660000.tar.xz
rpmtools-42b8201a89325abb266d3d2020e4b3d2c9660000.zip
fix version detection
Diffstat (limited to 'parsehdlist.c')
-rw-r--r--parsehdlist.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/parsehdlist.c b/parsehdlist.c
index 32143e4..f460961 100644
--- a/parsehdlist.c
+++ b/parsehdlist.c
@@ -12,10 +12,12 @@
#include <string.h>
#include <ctype.h>
-#include <rpm/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>
#else
+#include <rpm/rpmlib.h>
#include <rpm/header.h>
#endif