From 3d2a2bafefeaf495db459ceb3b7ed19e1a97eb33 Mon Sep 17 00:00:00 2001 From: Thomas Perale Date: Thu, 10 Jul 2025 16:32:44 +0200 Subject: [PATCH] package/libargtable2: fix build error with gcc-14 The following build error is happening on the autobuilder: ``` arg_int.c:60:12: error: implicit declaration of function 'isspace' [-Wimplicit-function-declaration] 60 | while (isspace(*ptr)) | ^~~~~~~ arg_int.c:33:1: note: include '' or provide a declaration of 'isspace' 32 | #include +++ |+#include 33 | arg_int.c:89:8: error: implicit declaration of function 'toupper' [-Wimplicit-function-declaration] 89 | if (toupper(*ptr++)!=toupper(X)) | ^~~~~~~ arg_int.c:89:8: note: include '' or provide a declaration of 'toupper' ``` Both `isspace` and `toupper` are declared in the `ctype.h` header. This build error started to happen with gcc-14. The `ctype.h` include was added in a later upstream commit. This patch adds that upstream commit and strip everything else to only patch that include. Fixes: https://autobuild.buildroot.org/results/d38/d38e3e12f52c3fde08ab446ca14a1a7bd65c9469// Signed-off-by: Thomas Perale [Julien: add comment about gcc-14] Signed-off-by: Julien Olivain (cherry picked from commit cd6f2b465bcc15f9f9ec338133b029094417c114) Signed-off-by: Titouan Christophe --- .../libargtable2/0001-apply-uint-patch.patch | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 package/libargtable2/0001-apply-uint-patch.patch diff --git a/package/libargtable2/0001-apply-uint-patch.patch b/package/libargtable2/0001-apply-uint-patch.patch new file mode 100644 index 0000000000..fed0307852 --- /dev/null +++ b/package/libargtable2/0001-apply-uint-patch.patch @@ -0,0 +1,25 @@ +From 3fe1ce4d7aa7c4fc16471a9ab023ecf6628c2f11 Mon Sep 17 00:00:00 2001 +From: Chris McClelland +Date: Thu, 12 Nov 2020 14:18:27 +0000 +Subject: [PATCH] Apply uint patch + +Upstream: https://github.com/makestuff/libargtable2/commit/3fe1ce4d7aa7c4fc16471a9ab023ecf6628c2f11 +[thomas: strip to only have the include] +Signed-off-by: Thomas Perale +--- + src/arg_int.c | 2 ++ + 1 files changed, 2 insertions(+) + +diff --git a/src/arg_int.c b/src/arg_int.c +index 29c20e5..c51706a 100644 +--- a/src/arg_int.c ++++ b/src/arg_int.c +@@ -24,6 +24,8 @@ USA. + #include "config.h" + #endif + ++#include ++ + /* #ifdef HAVE_STDLIB_H */ + #include + /* #endif */