summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2025-03-24 09:33:27 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2025-03-27 11:19:03 +0000
commit0480bea97a80b633994946a57f367e67cfca3765 (patch)
treea1174e381a0a9b0b39437f68f59a3439b413dc71 /meta
parent50a2fac8acd7b0e044b486b744b9cf51dc9b3fc4 (diff)
downloadpoky-0480bea97a80b633994946a57f367e67cfca3765.tar.gz
gawk: Fix build with gcc-15 on musl
getopt signature needs to include parameters or else gcc-15 complains (From OE-Core rev: 1ec77b42d83c5059b581c0adeb2d816105411230) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-extended/gawk/gawk/0001-Add-parameter-signatures-for-getenv-and-getopt.patch54
-rw-r--r--meta/recipes-extended/gawk/gawk_5.3.1.bb1
2 files changed, 55 insertions, 0 deletions
diff --git a/meta/recipes-extended/gawk/gawk/0001-Add-parameter-signatures-for-getenv-and-getopt.patch b/meta/recipes-extended/gawk/gawk/0001-Add-parameter-signatures-for-getenv-and-getopt.patch
new file mode 100644
index 0000000000..7ed615a881
--- /dev/null
+++ b/meta/recipes-extended/gawk/gawk/0001-Add-parameter-signatures-for-getenv-and-getopt.patch
@@ -0,0 +1,54 @@
1From 4a8352eeaa99bbea3461696855c973447e87abdd Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sat, 22 Mar 2025 15:14:16 -0700
4Subject: [PATCH] Add parameter signatures for getenv() and getopt()
5
6GCC-15 complains about it when building for musl C library
7
8Upstream-Status: Submitted [https://lists.gnu.org/archive/html/bug-gawk/2025-03/msg00027.html]
9Signed-off-by: Khem Raj <raj.khem@gmail.com>
10---
11 missing_d/fnmatch.c | 2 +-
12 support/getopt.c | 2 +-
13 support/getopt.h | 2 +-
14 3 files changed, 3 insertions(+), 3 deletions(-)
15
16diff --git a/missing_d/fnmatch.c b/missing_d/fnmatch.c
17index ccb7e34..7f97fbf 100644
18--- a/missing_d/fnmatch.c
19+++ b/missing_d/fnmatch.c
20@@ -121,7 +121,7 @@ USA. */
21 whose names are inconsistent. */
22
23 # if !defined _LIBC && !defined getenv
24-extern char *getenv ();
25+extern char *getenv (const char*);
26 # endif
27
28 # ifndef errno
29diff --git a/support/getopt.c b/support/getopt.c
30index eeb71ba..e7ebd19 100644
31--- a/support/getopt.c
32+++ b/support/getopt.c
33@@ -152,7 +152,7 @@ static struct _getopt_data getopt_data;
34 whose names are inconsistent. */
35
36 #ifndef getenv
37-extern char *getenv ();
38+extern char *getenv (const char*);
39 #endif
40
41 #endif /* not __GNU_LIBRARY__ */
42diff --git a/support/getopt.h b/support/getopt.h
43index 8393569..06482cf 100644
44--- a/support/getopt.h
45+++ b/support/getopt.h
46@@ -181,7 +181,7 @@ extern int __posix_getopt (int ___argc, char *const *___argv,
47 # endif
48 # endif
49 #else /* not __GNU_LIBRARY__ */
50-extern int getopt ();
51+extern int getopt (int, char * const*, const char *);
52 #endif /* __GNU_LIBRARY__ */
53
54 #ifndef __need_getopt
diff --git a/meta/recipes-extended/gawk/gawk_5.3.1.bb b/meta/recipes-extended/gawk/gawk_5.3.1.bb
index 724b561c93..1fe2f2b2a7 100644
--- a/meta/recipes-extended/gawk/gawk_5.3.1.bb
+++ b/meta/recipes-extended/gawk/gawk_5.3.1.bb
@@ -18,6 +18,7 @@ PACKAGECONFIG[mpfr] = "--with-mpfr,--without-mpfr, mpfr"
18SRC_URI = "${GNU_MIRROR}/gawk/gawk-${PV}.tar.gz \ 18SRC_URI = "${GNU_MIRROR}/gawk/gawk-${PV}.tar.gz \
19 file://run-ptest \ 19 file://run-ptest \
20 file://0001-configure.ac-re-enable-disabled-printf-features.patch \ 20 file://0001-configure.ac-re-enable-disabled-printf-features.patch \
21 file://0001-Add-parameter-signatures-for-getenv-and-getopt.patch \
21 " 22 "
22 23
23SRC_URI[sha256sum] = "fa41b3a85413af87fb5e3a7d9c8fa8d4a20728c67651185bb49c38a7f9382b1e" 24SRC_URI[sha256sum] = "fa41b3a85413af87fb5e3a7d9c8fa8d4a20728c67651185bb49c38a7f9382b1e"