From 1bb79ed5c87e338e53a34b2a40216d4353e2caa0 Mon Sep 17 00:00:00 2001 From: Thomas Bonnefille Date: Sat, 2 Aug 2025 13:37:26 +0200 Subject: [PATCH] package/ngrep: fix implicit function declaration (GCC14) Using toolchains based on GCC14 (and newer), now turns this warning into a systematic error (see [1]). The build failure can be reproduced with this minimal defconfig: BR2_x86_64=y BR2_x86_atom=y BR2_TOOLCHAIN_EXTERNAL=y BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y BR2_PACKAGE_NGREP=y BR2_PACKAGE_LIBNET=y [1] https://gcc.gnu.org/gcc-14/porting_to.html Fixes: https://autobuild.buildroot.org/results/20b/20b924c5c96b3f43e381d87e59fb160ba8d3dcd0// Signed-off-by: Thomas Bonnefille [Romain: - add a defconfig to reproduce the issue - add the minimal gcc version to reproduce the issue ] Signed-off-by: Romain Naour (cherry picked from commit 53d2ef7ec6fc406a23a5c5a13a4a3aefc8de3563) Signed-off-by: Thomas Perale --- ...d-tcpkill.h-to-avoid-implicit-functi.patch | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 package/ngrep/0006-Include-err.h-and-tcpkill.h-to-avoid-implicit-functi.patch diff --git a/package/ngrep/0006-Include-err.h-and-tcpkill.h-to-avoid-implicit-functi.patch b/package/ngrep/0006-Include-err.h-and-tcpkill.h-to-avoid-implicit-functi.patch new file mode 100644 index 0000000000..6d596bfe37 --- /dev/null +++ b/package/ngrep/0006-Include-err.h-and-tcpkill.h-to-avoid-implicit-functi.patch @@ -0,0 +1,44 @@ +From 52515bae377f221b5473d9040f5f43ab1c672672 Mon Sep 17 00:00:00 2001 +From: Florian Weimer +Date: Mon, 19 Dec 2022 11:49:06 +0100 +Subject: [PATCH] Include and "tcpkill.h" to avoid implicit function + declarations + +Implicit function declarations are a historic language feature that +were removed from C in 1999. + +Upstream: https://github.com/jpr5/ngrep/pull/28 + +Signed-off-by: Thomas Bonnefille +--- + ngrep.c | 1 + + tcpkill.c | 1 + + 2 files changed, 2 insertions(+) + +diff --git a/ngrep.c b/ngrep.c +index 3df9389..b2fcceb 100644 +--- a/ngrep.c ++++ b/ngrep.c +@@ -98,6 +98,7 @@ + #endif + + #include "ngrep.h" ++#include "tcpkill.h" + + + /* +diff --git a/tcpkill.c b/tcpkill.c +index 5388ec5..ac8fd2e 100644 +--- a/tcpkill.c ++++ b/tcpkill.c +@@ -14,6 +14,7 @@ + #include + #include + #include ++#include + #include + #include + +-- +2.50.1 +