[OE-core] [PATCH] mtd-utils: remove double hashtable iterator definition

Oleg Kokorin ole2mail at mail.com
Fri Jan 19 11:06:16 UTC 2018


hashtable_iterator_key and hashtable_iterator_value redefinition inside
mkfs.ubifs/hashtable/hashtable_itr.h cause linker redefinition error

Signed-off-by: Oleg Kokorin <ole2mail at mail.com>
---
 .../mtd-utils-fix-hashtable_iterator.patch         | 31 ++++++++++++++++++++++
 meta/recipes-devtools/mtd/mtd-utils_git.bb         |  1 +
 2 files changed, 32 insertions(+)
 create mode 100644 meta/recipes-devtools/mtd/mtd-utils/mtd-utils-fix-hashtable_iterator.patch

diff --git a/meta/recipes-devtools/mtd/mtd-utils/mtd-utils-fix-hashtable_iterator.patch b/meta/recipes-devtools/mtd/mtd-utils/mtd-utils-fix-hashtable_iterator.patch
new file mode 100644
index 0000000..082f3b1
--- /dev/null
+++ b/meta/recipes-devtools/mtd/mtd-utils/mtd-utils-fix-hashtable_iterator.patch
@@ -0,0 +1,31 @@
+Index: setup-scripts/build/tmp-angstrom_v2014_12-glibc/work/x86_64-linux/mtd-utils-native/1.5.1+gitAUTOINC+9f107132a6-r0/git/mkfs.ubifs/hashtable/hashtable_itr.h
+===================================================================
+--- a/mkfs.ubifs/hashtable/hashtable_itr.h
++++ b/mkfs.ubifs/hashtable/hashtable_itr.h
+@@ -27,22 +27,22 @@ hashtable_iterator(struct hashtable *h);
+ /*****************************************************************************/
+ /* hashtable_iterator_key
+  * - return the value of the (key,value) pair at the current position */
+-
++/*
+ extern inline void *
+ hashtable_iterator_key(struct hashtable_itr *i)
+ {
+     return i->e->k;
+ }
+-
++*/
+ /*****************************************************************************/
+ /* value - return the value of the (key,value) pair at the current position */
+-
++/*
+ extern inline void *
+ hashtable_iterator_value(struct hashtable_itr *i)
+ {
+     return i->e->v;
+ }
+-
++*/
+ /*****************************************************************************/
+ /* advance - advance the iterator to the next element
+  *           returns zero if advanced to end of table */
diff --git a/meta/recipes-devtools/mtd/mtd-utils_git.bb b/meta/recipes-devtools/mtd/mtd-utils_git.bb
index 52297c6..f903a65 100644
--- a/meta/recipes-devtools/mtd/mtd-utils_git.bb
+++ b/meta/recipes-devtools/mtd/mtd-utils_git.bb
@@ -11,6 +11,7 @@ SRCREV = "9f107132a6a073cce37434ca9cda6917dd8d866b"
 SRC_URI = "git://git.infradead.org/mtd-utils.git \
 		file://add-exclusion-to-mkfs-jffs2-git-2.patch \
 		file://fix-armv7-neon-alignment.patch \
+		file://mtd-utils-fix-hashtable_iterator.patch \
 "
 
 PV = "1.5.1+git${SRCPV}"
-- 
2.7.4




More information about the Openembedded-core mailing list