new file mode 100644
@@ -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__ */
@@ -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"
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> --- ...0001-getopt-Fix-type-signature-for-getenv.patch | 27 ++++++++++++++++++++++ meta/recipes-extended/groff/groff_1.23.0.bb | 1 + 2 files changed, 28 insertions(+)