From b0bf5cb73a24def1a9fef8c0e7e2561eaaf9c8cb Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Sat, 27 Dec 2025 23:49:08 +0100 Subject: [PATCH] package/matchbox-lib: fix build failure with GCC 15.x MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Backport upstream patch fixing: hash.c:76:6: error: conflicting types for ‘hash_empty’; have ‘void(struct hash *)’ 76 | void hash_empty(struct hash *h) | ^~~~~~~~~~ In file included from hash.c:22: hash.h:41:6: note: previous declaration of ‘hash_empty’ with type ‘void(void)’ 41 | void hash_empty(); | ^~~~~~~~~~ Signed-off-by: Thomas Petazzoni (cherry picked from commit 2bfdadab434d3f9100b66a783ee317d118b5623c) Signed-off-by: Thomas Perale --- ...ine-correct-prototype-for-hash_empty.patch | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 package/matchbox-lib/0002-Define-correct-prototype-for-hash_empty.patch diff --git a/package/matchbox-lib/0002-Define-correct-prototype-for-hash_empty.patch b/package/matchbox-lib/0002-Define-correct-prototype-for-hash_empty.patch new file mode 100644 index 0000000000..ac65d03b12 --- /dev/null +++ b/package/matchbox-lib/0002-Define-correct-prototype-for-hash_empty.patch @@ -0,0 +1,34 @@ +From 312c04b6ba60dca0d6c4a7d1393f0ec816a265e3 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Mon, 17 Mar 2025 14:16:03 -0700 +Subject: [PATCH] Define correct prototype for hash_empty() + +GCC-15 follows C23 standard which does not allow function +declarations without parameters and types + +Fixes + +../../git/libmb/hash.c:76:6: error: conflicting types for 'hash_empty'; have 'void(struct hash *)' + +Signed-off-by: Khem Raj +Signed-off-by: Richard Purdie +Upstream: https://git.yoctoproject.org/libmatchbox/commit/?id=312c04b6ba60dca0d6c4a7d1393f0ec816a265e3 +Signed-off-by: Thomas Petazzoni +--- + libmb/hash.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libmb/hash.h b/libmb/hash.h +index 86f18bf..43827b2 100644 +--- a/libmb/hash.h ++++ b/libmb/hash.h +@@ -38,5 +38,5 @@ struct hash* hash_new(int size); + unsigned int hashfunc(struct hash *h, char *s); + struct nlist *hash_lookup(struct hash *h, char *s); + struct nlist *hash_add(struct hash *h, char *key, char *val); +-void hash_empty(); ++void hash_empty(struct hash *h); + void hash_destroy(struct hash *h); +-- +2.52.0 +