diff options
author | Khem Raj <raj.khem@gmail.com> | 2015-04-15 19:00:26 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-07-08 13:07:16 +0100 |
commit | 2468978cb4ce8c41af2916e727a78115bafe5322 (patch) | |
tree | 8b575d9bf51eef581bc0120d7e138ac33ee3df17 | |
parent | 5bda039a8e322de01d967f604b8abb8283459ca3 (diff) | |
download | poky-2468978cb4ce8c41af2916e727a78115bafe5322.tar.gz |
mtd-utils: update to latest and fix static inlining
use static storage class instead of extern for inline functions
and remove duplicate definitions as a result
Change-Id: I72e8c5f19dff656c18f719d1e9e2ca697c9a856f
(From OE-Core rev: 1a9d92b9891c06ede91af05d516a429e1f81777d)
(From OE-Core rev: efada40a7a785446f9c46aa8a7d0e1c7407376e9)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/recipes-devtools/mtd/mtd-utils/0001-hashtable-Remove-duplicate-hashtable_iterator_value-.patch | 64 | ||||
-rw-r--r-- | meta/recipes-devtools/mtd/mtd-utils_git.bb | 1 |
2 files changed, 65 insertions, 0 deletions
diff --git a/meta/recipes-devtools/mtd/mtd-utils/0001-hashtable-Remove-duplicate-hashtable_iterator_value-.patch b/meta/recipes-devtools/mtd/mtd-utils/0001-hashtable-Remove-duplicate-hashtable_iterator_value-.patch new file mode 100644 index 0000000000..2d36158f54 --- /dev/null +++ b/meta/recipes-devtools/mtd/mtd-utils/0001-hashtable-Remove-duplicate-hashtable_iterator_value-.patch | |||
@@ -0,0 +1,64 @@ | |||
1 | From b856ff35c20124ceae40bbc4d32584df47618c96 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Wed, 25 Feb 2015 09:28:26 +0000 | ||
4 | Subject: [PATCH] hashtable: Remove duplicate hashtable_iterator_value/hashtable_iterator_key | ||
5 | |||
6 | gcc5 is defaulting to gnu11 instead of gnu89 like previous versions | ||
7 | as a result the semantics of 'extern inline' changes where in gnu89 for 'extern inline' no external | ||
8 | visible function is generated,in c99 'external inline' generates externally visible function | ||
9 | there is no equivalent in c99+ because redefinitions arent allowed | ||
10 | but 'static inline' remains same for for c89 and c99+, thats why we change the semantics | ||
11 | so we make the functions static inline, and achieve the same effect | ||
12 | |||
13 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
14 | Upstream-Status: pending | ||
15 | |||
16 | --- | ||
17 | mkfs.ubifs/hashtable/hashtable_itr.c | 12 ------------ | ||
18 | 1 file changed, 12 deletions(-) | ||
19 | |||
20 | Index: git/mkfs.ubifs/hashtable/hashtable_itr.h | ||
21 | =================================================================== | ||
22 | --- git.orig/mkfs.ubifs/hashtable/hashtable_itr.h | ||
23 | +++ git/mkfs.ubifs/hashtable/hashtable_itr.h | ||
24 | @@ -28,7 +28,7 @@ hashtable_iterator(struct hashtable *h); | ||
25 | /* hashtable_iterator_key | ||
26 | * - return the value of the (key,value) pair at the current position */ | ||
27 | |||
28 | -extern inline void * | ||
29 | +static inline void * | ||
30 | hashtable_iterator_key(struct hashtable_itr *i) | ||
31 | { | ||
32 | return i->e->k; | ||
33 | @@ -37,7 +37,7 @@ hashtable_iterator_key(struct hashtable_ | ||
34 | /*****************************************************************************/ | ||
35 | /* value - return the value of the (key,value) pair at the current position */ | ||
36 | |||
37 | -extern inline void * | ||
38 | +static inline void * | ||
39 | hashtable_iterator_value(struct hashtable_itr *i) | ||
40 | { | ||
41 | return i->e->v; | ||
42 | Index: git/mkfs.ubifs/hashtable/hashtable_itr.c | ||
43 | =================================================================== | ||
44 | --- git.orig/mkfs.ubifs/hashtable/hashtable_itr.c | ||
45 | +++ git/mkfs.ubifs/hashtable/hashtable_itr.c | ||
46 | @@ -35,18 +35,6 @@ hashtable_iterator(struct hashtable *h) | ||
47 | } | ||
48 | |||
49 | /*****************************************************************************/ | ||
50 | -/* key - return the key of the (key,value) pair at the current position */ | ||
51 | -/* value - return the value of the (key,value) pair at the current position */ | ||
52 | - | ||
53 | -void * | ||
54 | -hashtable_iterator_key(struct hashtable_itr *i) | ||
55 | -{ return i->e->k; } | ||
56 | - | ||
57 | -void * | ||
58 | -hashtable_iterator_value(struct hashtable_itr *i) | ||
59 | -{ return i->e->v; } | ||
60 | - | ||
61 | -/*****************************************************************************/ | ||
62 | /* advance - advance the iterator to the next element | ||
63 | * returns zero if advanced to end of table */ | ||
64 | |||
diff --git a/meta/recipes-devtools/mtd/mtd-utils_git.bb b/meta/recipes-devtools/mtd/mtd-utils_git.bb index 12daffec47..f991ea17c3 100644 --- a/meta/recipes-devtools/mtd/mtd-utils_git.bb +++ b/meta/recipes-devtools/mtd/mtd-utils_git.bb | |||
@@ -13,6 +13,7 @@ SRCREV = "9f107132a6a073cce37434ca9cda6917dd8d866b" | |||
13 | SRC_URI = "git://git.infradead.org/mtd-utils.git \ | 13 | SRC_URI = "git://git.infradead.org/mtd-utils.git \ |
14 | file://add-exclusion-to-mkfs-jffs2-git-2.patch \ | 14 | file://add-exclusion-to-mkfs-jffs2-git-2.patch \ |
15 | file://fix-armv7-neon-alignment.patch \ | 15 | file://fix-armv7-neon-alignment.patch \ |
16 | file://0001-hashtable-Remove-duplicate-hashtable_iterator_value-.patch \ | ||
16 | " | 17 | " |
17 | 18 | ||
18 | S = "${WORKDIR}/git/" | 19 | S = "${WORKDIR}/git/" |