diff options
author | Ross Burton <ross.burton@arm.com> | 2024-05-21 15:32:31 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-05-22 10:21:27 +0100 |
commit | 3d2ade560bea80d5166a84ef3c113da4e57f3a38 (patch) | |
tree | c3d46e4ad306cd28ad96614f0e22a33e5191fd5c /meta/recipes-extended/gawk/gawk/0001-m4-readline-add-missing-includes.patch | |
parent | 73da2653818739fb759d820f6c101149c832d0ff (diff) | |
download | poky-3d2ade560bea80d5166a84ef3c113da4e57f3a38.tar.gz |
gawk: fix readline detection
The code fragment used to detect readline in cross builds doesn't compile
cleanly with GCC 14.1, so readline is never enabled.
Add missing includes so the test works, and readline can be enabled.
(From OE-Core rev: a6e7c3ce700b82c57f1102187fea6b387339eca3)
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-extended/gawk/gawk/0001-m4-readline-add-missing-includes.patch')
-rw-r--r-- | meta/recipes-extended/gawk/gawk/0001-m4-readline-add-missing-includes.patch | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/meta/recipes-extended/gawk/gawk/0001-m4-readline-add-missing-includes.patch b/meta/recipes-extended/gawk/gawk/0001-m4-readline-add-missing-includes.patch new file mode 100644 index 0000000000..5be2fd97ee --- /dev/null +++ b/meta/recipes-extended/gawk/gawk/0001-m4-readline-add-missing-includes.patch | |||
@@ -0,0 +1,38 @@ | |||
1 | From 4f4e84f139e2a8682f1374a592f2636c43ad857b Mon Sep 17 00:00:00 2001 | ||
2 | From: Ross Burton <ross.burton@arm.com> | ||
3 | Date: Tue, 21 May 2024 15:10:11 +0000 | ||
4 | Subject: [PATCH] m4/readline: add missing includes | ||
5 | |||
6 | The cross-specific code fragment only includes stdio.h, where the native | ||
7 | fragment also includes fcntl.h and unistd.h. This is important because | ||
8 | GCC 14.1 has made the implicit definitions an error: | ||
9 | |||
10 | conftest.c: In function 'main': | ||
11 | conftest.c:144:9: error: implicit declaration of function 'close'; did you mean 'pclose'? [-Wimplicit-function-declaration] | ||
12 | conftest.c:146:14: error: implicit declaration of function 'open'; did you mean 'popen'? [-Wimplicit-function-declaration] | ||
13 | |||
14 | Add the missing includes so that the check doesn't always fail due to | ||
15 | these errors. | ||
16 | |||
17 | Upstream-Status: Submitted [https://lists.gnu.org/archive/html/bug-gawk/2024-05/msg00000.html] | ||
18 | Signed-off-by: Ross Burton <ross.burton@arm.com> | ||
19 | --- | ||
20 | m4/readline.m4 | 2 ++ | ||
21 | 1 file changed, 2 insertions(+) | ||
22 | |||
23 | diff --git a/m4/readline.m4 b/m4/readline.m4 | ||
24 | index 38f96326..efd52d4e 100644 | ||
25 | --- a/m4/readline.m4 | ||
26 | +++ b/m4/readline.m4 | ||
27 | @@ -66,6 +66,8 @@ dnl action if false: | ||
28 | dnl action if cross compiling: | ||
29 | [AC_LINK_IFELSE( | ||
30 | [AC_LANG_PROGRAM([[#include <stdio.h> | ||
31 | +#include <fcntl.h> | ||
32 | +#include <unistd.h> | ||
33 | #include <readline/readline.h> | ||
34 | #include <readline/history.h>]], dnl includes | ||
35 | dnl function body | ||
36 | -- | ||
37 | 2.34.1 | ||
38 | |||