Control: tags -1 patch upstream
Control: forwarded -1 
http://lists.infradead.org/pipermail/linux-mtd/2015-April/058760.html

On Thu, 12 Feb 2015 10:34:41 +0000 Matthias Klose <d...@debian.org> wrote:
> The package fails to build in a test rebuild on at least amd64 with
> gcc-5/g++-5, but succeeds to build with gcc-4.9/g++-4.9. The
> severity of this report may be raised before the stretch release.

Here's a patch which I also submitted upstream.

Thanks,
James
From 3ac089d000f764b4c227346c23aed54f68f28d72 Mon Sep 17 00:00:00 2001
From: James Cowgill <james...@cowgill.org.uk>
Date: Thu, 16 Apr 2015 17:01:49 +0100
Subject: [PATCH] mtd-utils: make hashtable_iterator functions static inline

GCC 5 changed the default C standard to gnu11 which changed the behavior of the
inline keyword. This causes mtd-utils to fail to build with duplicate
definition errors involving hashtable_iterator_key and
hashtable_iterator_value.

This patch fixes the build by making the functions static inline and removing
the extra definitions in hashtable_itr.c.

Signed-off-by: James Cowgill <james...@cowgill.org.uk>
---
 mkfs.ubifs/hashtable/hashtable_itr.c | 12 ------------
 mkfs.ubifs/hashtable/hashtable_itr.h |  4 ++--
 2 files changed, 2 insertions(+), 14 deletions(-)

diff --git a/mkfs.ubifs/hashtable/hashtable_itr.c b/mkfs.ubifs/hashtable/hashtable_itr.c
index 24f4dde..d102453 100644
--- a/mkfs.ubifs/hashtable/hashtable_itr.c
+++ b/mkfs.ubifs/hashtable/hashtable_itr.c
@@ -35,18 +35,6 @@ hashtable_iterator(struct hashtable *h)
 }
 
 /*****************************************************************************/
-/* key      - return the key of the (key,value) pair at the current position */
-/* value    - return the value of the (key,value) pair at the current position */
-
-void *
-hashtable_iterator_key(struct hashtable_itr *i)
-{ return i->e->k; }
-
-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/mkfs.ubifs/hashtable/hashtable_itr.h b/mkfs.ubifs/hashtable/hashtable_itr.h
index 87a97eb..5c94a04 100644
--- a/mkfs.ubifs/hashtable/hashtable_itr.h
+++ b/mkfs.ubifs/hashtable/hashtable_itr.h
@@ -28,7 +28,7 @@ hashtable_iterator(struct hashtable *h);
 /* hashtable_iterator_key
  * - return the value of the (key,value) pair at the current position */
 
-extern inline void *
+static inline void *
 hashtable_iterator_key(struct hashtable_itr *i)
 {
     return i->e->k;
@@ -37,7 +37,7 @@ hashtable_iterator_key(struct hashtable_itr *i)
 /*****************************************************************************/
 /* value - return the value of the (key,value) pair at the current position */
 
-extern inline void *
+static inline void *
 hashtable_iterator_value(struct hashtable_itr *i)
 {
     return i->e->v;
-- 
2.1.4

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to