summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2025-03-24 09:33:31 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2025-03-27 11:19:03 +0000
commitd56592776d5d93a7ef036435a1bc3da9c7cf5aeb (patch)
tree052b8d599193803a7194930e4f3fd84313713d4f
parent48e34a905e0863b3bc951ae4126b817b8b535f2b (diff)
downloadpoky-d56592776d5d93a7ef036435a1bc3da9c7cf5aeb.tar.gz
bc: Add missing params to getopt/getenv signatures
Fix build with GCC 15 on musl (From OE-Core rev: 22418116d6dd7b3475d074ecb6a0b1d5c00b229b) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-extended/bc/bc/0001-getopt-Add-missing-params-to-getopt-getenv-signature.patch40
-rw-r--r--meta/recipes-extended/bc/bc_1.08.1.bb1
2 files changed, 41 insertions, 0 deletions
diff --git a/meta/recipes-extended/bc/bc/0001-getopt-Add-missing-params-to-getopt-getenv-signature.patch b/meta/recipes-extended/bc/bc/0001-getopt-Add-missing-params-to-getopt-getenv-signature.patch
new file mode 100644
index 0000000000..f43f336075
--- /dev/null
+++ b/meta/recipes-extended/bc/bc/0001-getopt-Add-missing-params-to-getopt-getenv-signature.patch
@@ -0,0 +1,40 @@
1From 493997b0d2c3dc6469f967d8f619ed934667c71e Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sat, 22 Mar 2025 18:33:08 -0700
4Subject: [PATCH] getopt: Add missing params to getopt/getenv signatures
5
6This ensures it can compile with GCC 15 on musl
7
8Upstream-Status: Submitted [sent to bug-bc@gnu.org]
9Signed-off-by: Khem Raj <raj.khem@gmail.com>
10---
11 h/getopt.h | 2 +-
12 lib/getopt.c | 2 +-
13 2 files changed, 2 insertions(+), 2 deletions(-)
14
15diff --git a/h/getopt.h b/h/getopt.h
16index cc45f46..5ea5eac 100644
17--- a/h/getopt.h
18+++ b/h/getopt.h
19@@ -141,7 +141,7 @@ struct option
20 errors, only prototype getopt for the GNU C library. */
21 extern int getopt (int ___argc, char *const *___argv, const char *__shortopts);
22 #else /* not __GNU_LIBRARY__ */
23-extern int getopt ();
24+extern int getopt (int, char * const*, const char *);
25 #endif /* __GNU_LIBRARY__ */
26
27 #ifndef __need_getopt
28diff --git a/lib/getopt.c b/lib/getopt.c
29index b270074..3e6d071 100644
30--- a/lib/getopt.c
31+++ b/lib/getopt.c
32@@ -197,7 +197,7 @@ static char *posixly_correct;
33 whose names are inconsistent. */
34
35 #ifndef getenv
36-extern char *getenv ();
37+extern char *getenv (const char*);
38 #endif
39
40 #endif /* not __GNU_LIBRARY__ */
diff --git a/meta/recipes-extended/bc/bc_1.08.1.bb b/meta/recipes-extended/bc/bc_1.08.1.bb
index 473d78d8a7..5fbbe7ef6a 100644
--- a/meta/recipes-extended/bc/bc_1.08.1.bb
+++ b/meta/recipes-extended/bc/bc_1.08.1.bb
@@ -13,6 +13,7 @@ SECTION = "base"
13DEPENDS = "flex-native" 13DEPENDS = "flex-native"
14 14
15SRC_URI = "${GNU_MIRROR}/${BPN}/${BP}.tar.gz \ 15SRC_URI = "${GNU_MIRROR}/${BPN}/${BP}.tar.gz \
16 file://0001-getopt-Add-missing-params-to-getopt-getenv-signature.patch \
16 file://run-ptest" 17 file://run-ptest"
17SRC_URI[sha256sum] = "b71457ffeb210d7ea61825ff72b3e49dc8f2c1a04102bbe23591d783d1bfe996" 18SRC_URI[sha256sum] = "b71457ffeb210d7ea61825ff72b3e49dc8f2c1a04102bbe23591d783d1bfe996"
18 19