mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-09-09 07:51:59 -09:00
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 '<ctype.h>' or provide a declaration of 'isspace'
32 | #include <limits.h>
+++ |+#include <ctype.h>
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 '<ctype.h>' 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 <thomas.perale@mind.be>
[Julien: add comment about gcc-14]
Signed-off-by: Julien Olivain <ju.o@free.fr>
(cherry picked from commit cd6f2b465b)
Signed-off-by: Titouan Christophe <titouan.christophe@mind.be>
This commit is contained in:
committed by
Titouan Christophe
parent
1a0486503b
commit
3d2a2bafef
25
package/libargtable2/0001-apply-uint-patch.patch
Normal file
25
package/libargtable2/0001-apply-uint-patch.patch
Normal file
@@ -0,0 +1,25 @@
|
||||
From 3fe1ce4d7aa7c4fc16471a9ab023ecf6628c2f11 Mon Sep 17 00:00:00 2001
|
||||
From: Chris McClelland <prophet3636@gmail.com>
|
||||
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 <thomas.perale@mind.be>
|
||||
---
|
||||
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 <ctype.h>
|
||||
+
|
||||
/* #ifdef HAVE_STDLIB_H */
|
||||
#include <stdlib.h>
|
||||
/* #endif */
|
||||
Reference in New Issue
Block a user