diff options
| author | Khem Raj <raj.khem@gmail.com> | 2025-03-24 09:33:27 -0700 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-03-27 11:19:03 +0000 |
| commit | 0480bea97a80b633994946a57f367e67cfca3765 (patch) | |
| tree | a1174e381a0a9b0b39437f68f59a3439b413dc71 /meta | |
| parent | 50a2fac8acd7b0e044b486b744b9cf51dc9b3fc4 (diff) | |
| download | poky-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.patch | 54 | ||||
| -rw-r--r-- | meta/recipes-extended/gawk/gawk_5.3.1.bb | 1 |
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 @@ | |||
| 1 | From 4a8352eeaa99bbea3461696855c973447e87abdd Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Sat, 22 Mar 2025 15:14:16 -0700 | ||
| 4 | Subject: [PATCH] Add parameter signatures for getenv() and getopt() | ||
| 5 | |||
| 6 | GCC-15 complains about it when building for musl C library | ||
| 7 | |||
| 8 | Upstream-Status: Submitted [https://lists.gnu.org/archive/html/bug-gawk/2025-03/msg00027.html] | ||
| 9 | Signed-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 | |||
| 16 | diff --git a/missing_d/fnmatch.c b/missing_d/fnmatch.c | ||
| 17 | index 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 | ||
| 29 | diff --git a/support/getopt.c b/support/getopt.c | ||
| 30 | index 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__ */ | ||
| 42 | diff --git a/support/getopt.h b/support/getopt.h | ||
| 43 | index 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" | |||
| 18 | SRC_URI = "${GNU_MIRROR}/gawk/gawk-${PV}.tar.gz \ | 18 | SRC_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 | ||
| 23 | SRC_URI[sha256sum] = "fa41b3a85413af87fb5e3a7d9c8fa8d4a20728c67651185bb49c38a7f9382b1e" | 24 | SRC_URI[sha256sum] = "fa41b3a85413af87fb5e3a7d9c8fa8d4a20728c67651185bb49c38a7f9382b1e" |
