From be577adfbc75f5ad2ab4190c6eaacf385132396f Mon Sep 17 00:00:00 2001 From: Thomas Bonnefille Date: Mon, 16 Dec 2024 23:36:00 +0100 Subject: [PATCH] package/libsha1: Fix gcc14 compilation in libsha1 GCC14 removed the implicit int support. This commit adds a patch to libsha1 to fix an implicit int declaration as recommended. Link: https://gcc.gnu.org/gcc-14/porting_to.html Fixes: http://autobuild.buildroot.net/results/87dc9ba9690cbb6a82875734ce9cb8dbaf878e46/ Signed-off-by: Thomas Bonnefille Signed-off-by: Peter Korsgaard (cherry picked from commit d427d27aeeaec4ff52e948fdc7d4be3ce0c9e2bb) Signed-off-by: Peter Korsgaard --- ...st-fix-gcc-14.x-compile-implicit-int.patch | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 package/libsha1/0001-test-fix-gcc-14.x-compile-implicit-int.patch diff --git a/package/libsha1/0001-test-fix-gcc-14.x-compile-implicit-int.patch b/package/libsha1/0001-test-fix-gcc-14.x-compile-implicit-int.patch new file mode 100644 index 0000000000..603a2b77a8 --- /dev/null +++ b/package/libsha1/0001-test-fix-gcc-14.x-compile-implicit-int.patch @@ -0,0 +1,39 @@ +From d449f26f782be91b3847f88ed2bd937582a575b6 Mon Sep 17 00:00:00 2001 +From: Peter Seiderer +Date: Sun, 25 Aug 2024 11:33:59 +0200 +Subject: [PATCH] test: fix gcc-14.x compile (implicit int) +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Fixes: + + test.c:14:8: error: type defaults to ‘int’ in declaration of ‘num_test’ [-Wimplicit-int] + 14 | static num_test; + | ^~~~~~~~ + +Signed-off-by: Peter Seiderer + +Upstream: https://github.com/dottedmag/libsha1/pull/1 + +Signed-off-by: Thomas Bonnefille +--- + test.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/test.c b/test.c +index 21a6525..1ec89d3 100644 +--- a/test.c ++++ b/test.c +@@ -11,7 +11,7 @@ static void print_hex(const char* data, size_t size) + printf("%x%x", ((unsigned char)data[i])/16, ((unsigned char)data[i])%16); + } + +-static num_test; ++static int num_test; + + static int do_test(const char* data, size_t size, const char* expected_dgst) + { +-- +2.47.1 +