dev-libs/kpathsea: drop redefinition of getopt (musl)

Signed-off-by: Alfredo Tupone <tupone@gentoo.org>
This commit is contained in:
Alfredo Tupone
2026-04-08 00:04:26 +02:00
parent 16c60f5deb
commit 17883c750f
2 changed files with 24 additions and 1 deletions

View File

@@ -0,0 +1,22 @@
--- a/getopt.h 2026-04-07 15:14:48.565190070 +0200
+++ b/getopt.h 2026-04-07 15:17:07.788553013 +0200
@@ -117,7 +117,7 @@
#define optional_argument 2
#endif /* need getopt */
-#if defined(__GNU_LIBRARY__) || defined (WIN32) || defined (__CYGWIN__)
+#if defined(__GNU_LIBRARY__) || defined (WIN32) || defined (__CYGWIN__) || defined(__linux__)
/* Many other libraries have conflicting prototypes for getopt, with
differences in the consts, in stdlib.h. To avoid compilation
errors, only prototype getopt for the GNU C library. And not when
--- a/getopt.c 2026-04-07 15:14:45.507226231 +0200
+++ b/getopt.c 2026-04-07 15:16:52.243736062 +0200
@@ -194,7 +194,7 @@
/* Value of POSIXLY_CORRECT environment variable. */
static char *posixly_correct;
-#if defined(__GNU_LIBRARY__) || defined(WIN32)
+#if defined(__GNU_LIBRARY__) || defined(WIN32) || defined(__linux__)
/* We want to avoid inclusion of string.h with non-GNU libraries
because there are many ways it can cause trouble.
On some systems, it contains special magic macros that don't work

View File

@@ -1,4 +1,4 @@
# Copyright 1999-2025 Gentoo Authors
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -37,6 +37,7 @@ TEXMF_PATH=/usr/share/texmf-dist
PATCHES=(
"${FILESDIR}"/kpathsea-6.4.0_p20240311-c23.patch
"${FILESDIR}"/kpathsea-6.4.0_p20240311-r1-musl.patch
)
src_prepare() {