summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/rpm/rpm/hdraddorappend.patch
diff options
context:
space:
mode:
authorQing He <qing.he@intel.com>2010-08-26 08:41:03 +0800
committerRichard Purdie <rpurdie@linux.intel.com>2010-08-31 17:19:19 +0100
commita0b72c297193d7cc3edb5a36bb8acbc5190537ed (patch)
treeb88a980b1027690d0bb2a2849951f9b831d48108 /meta/recipes-devtools/rpm/rpm/hdraddorappend.patch
parentadfd0e04343ad7770642eadf07a7f9185be6e25d (diff)
downloadpoky-a0b72c297193d7cc3edb5a36bb8acbc5190537ed.tar.gz
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 <qing.he@intel.com>
Diffstat (limited to 'meta/recipes-devtools/rpm/rpm/hdraddorappend.patch')
-rw-r--r--meta/recipes-devtools/rpm/rpm/hdraddorappend.patch22
1 files changed, 22 insertions, 0 deletions
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 @@
1diff --git a/lib/rpm4compat.h b/lib/rpm4compat.h
2index b957f8e..b1954d5 100644
3--- a/lib/rpm4compat.h
4+++ b/lib/rpm4compat.h
5@@ -211,6 +211,17 @@ static inline int headerAddEntry(Header h, int_32 tag, int_32 type, const void *
6 return headerPut(h, he, 0);
7 }
8
9+static inline int headerAddOrAppendEntry(Header h, int_32 tag, int_32 type, const void * p, int_32 c) {
10+ HE_t he = (HE_s*)memset(alloca(sizeof(*he)), 0, sizeof(*he));
11+
12+ he->tag = (rpmTag)tag;
13+ he->t = (rpmTagType)type;
14+ he->p.str = (const char*)p;
15+ he->c = (rpmTagCount)c;
16+ he->append = 1;
17+ return headerPut(h, he, 0);
18+}
19+
20 static inline int headerRemoveEntry(Header h, int_32 tag) {
21 HE_t he = (HE_s*)memset(alloca(sizeof(*he)), 0, sizeof(*he));
22