From a0b72c297193d7cc3edb5a36bb8acbc5190537ed Mon Sep 17 00:00:00 2001 From: Qing He Date: Thu, 26 Aug 2010 08:41:03 +0800 Subject: rpm: compatiblity and header fix changes: - add headerAddOrAppendEntry in lib/rpm4compat.h for compatibility - fix rpmbag.h introduced in rpm 5.1.10 Signed-off-by: Qing He --- meta/recipes-devtools/rpm/rpm/hdraddorappend.patch | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 meta/recipes-devtools/rpm/rpm/hdraddorappend.patch (limited to 'meta/recipes-devtools/rpm/rpm/hdraddorappend.patch') diff --git a/meta/recipes-devtools/rpm/rpm/hdraddorappend.patch b/meta/recipes-devtools/rpm/rpm/hdraddorappend.patch new file mode 100644 index 0000000000..020337a598 --- /dev/null +++ b/meta/recipes-devtools/rpm/rpm/hdraddorappend.patch @@ -0,0 +1,22 @@ +diff --git a/lib/rpm4compat.h b/lib/rpm4compat.h +index b957f8e..b1954d5 100644 +--- a/lib/rpm4compat.h ++++ b/lib/rpm4compat.h +@@ -211,6 +211,17 @@ static inline int headerAddEntry(Header h, int_32 tag, int_32 type, const void * + return headerPut(h, he, 0); + } + ++static inline int headerAddOrAppendEntry(Header h, int_32 tag, int_32 type, const void * p, int_32 c) { ++ HE_t he = (HE_s*)memset(alloca(sizeof(*he)), 0, sizeof(*he)); ++ ++ he->tag = (rpmTag)tag; ++ he->t = (rpmTagType)type; ++ he->p.str = (const char*)p; ++ he->c = (rpmTagCount)c; ++ he->append = 1; ++ return headerPut(h, he, 0); ++} ++ + static inline int headerRemoveEntry(Header h, int_32 tag) { + HE_t he = (HE_s*)memset(alloca(sizeof(*he)), 0, sizeof(*he)); + -- cgit v1.2.3-54-g00ecf