]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
groff: Fix build with GCC-15 on musl
authorKhem Raj <raj.khem@gmail.com>
Mon, 24 Mar 2025 16:33:26 +0000 (09:33 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 26 Mar 2025 18:45:14 +0000 (18:45 +0000)
part of getopt.c is used in non-glibc libraries needs
attention when compiling with gcc-15

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-extended/groff/files/0001-getopt-Fix-type-signature-for-getenv.patch [new file with mode: 0644]
meta/recipes-extended/groff/groff_1.23.0.bb

diff --git a/meta/recipes-extended/groff/files/0001-getopt-Fix-type-signature-for-getenv.patch b/meta/recipes-extended/groff/files/0001-getopt-Fix-type-signature-for-getenv.patch
new file mode 100644 (file)
index 0000000..c69a2b4
--- /dev/null
@@ -0,0 +1,27 @@
+From b68b3c6157c531bdcf5812fd93aadff9c18de6bd Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 22 Mar 2025 14:41:23 -0700
+Subject: [PATCH] getopt: Fix type signature for getenv()
+
+This fixes build on musl with GCC 15
+
+Upstream-Status: Inappropriate [Next version is use getopt.c from gnulib]
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/libs/libgroff/getopt.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/libs/libgroff/getopt.c b/src/libs/libgroff/getopt.c
+index 6efa529..ce39115 100644
+--- a/src/libs/libgroff/getopt.c
++++ b/src/libs/libgroff/getopt.c
+@@ -122,7 +122,7 @@ static struct _getopt_data getopt_data;
+    whose names are inconsistent.  */
+ #ifndef getenv
+-extern char *getenv ();
++extern char *getenv (const char *);
+ #endif
+ #endif /* not __GNU_LIBRARY__ */
index 34a42c7e264a63c021076737b326b397ffd8c184..0c2ef6175826a0acd1affaf60b09297a171d858c 100644 (file)
@@ -14,6 +14,7 @@ SRC_URI = "${GNU_MIRROR}/groff/groff-${PV}.tar.gz \
            file://0001-build-meintro_fr.ps-depends-on-tbl.patch \
            file://0001-hdtbl-Fix-Savannah-66316-missing-grn-dep.patch \
            file://0001-contrib-hdtbl-hdtbl.am-Fix-race-issues-for-parallel-.patch \
+           file://0001-getopt-Fix-type-signature-for-getenv.patch \
            "
 
 SRC_URI[sha256sum] = "6b9757f592b7518b4902eb6af7e54570bdccba37a871fddb2d30ae3863511c13"