mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-24 04:59:14 -07:00
app-text/enscript: fix compilation for musl + gcc15
These compilation errors didn't appear before, because the buggy code is only compiled and linked with musl. The old Autotools included with enscript assume that, if you don't have GLIBC, you can't link it with external gettext libraries, and it must use the included gettext/libintl code. Signed-off-by: Cristian Othón Martínez Vera <cfuga@cfuga.mx> Part-of: https://github.com/gentoo/gentoo/pull/45577 Closes: https://github.com/gentoo/gentoo/pull/45577 Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
committed by
Sam James
parent
4e1511c076
commit
e3bb24923e
@@ -28,6 +28,7 @@ PATCHES=(
|
||||
"${FILESDIR}"/${PN}-1.6.4-fsf-gcc-darwin.patch
|
||||
"${FILESDIR}"/${PN}-1.6.2-implicit-function-decl.patch
|
||||
"${FILESDIR}"/${PN}-1.6.6-gcc15.patch
|
||||
"${FILESDIR}"/${PN}-1.6.6-musl.patch
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
|
||||
39
app-text/enscript/files/enscript-1.6.6-musl.patch
Normal file
39
app-text/enscript/files/enscript-1.6.6-musl.patch
Normal file
@@ -0,0 +1,39 @@
|
||||
--- a/intl/dcigettext.c
|
||||
+++ b/intl/dcigettext.c
|
||||
@@ -152,7 +152,7 @@
|
||||
# if VMS
|
||||
# define getcwd(buf, max) (getcwd) (buf, max, 0)
|
||||
# else
|
||||
-char *getcwd ();
|
||||
+char *getcwd (char *buf, size_t size);
|
||||
# endif
|
||||
# endif
|
||||
# ifndef HAVE_STPCPY
|
||||
--- a/compat/getopt.c
|
||||
+++ b/compat/getopt.c
|
||||
@@ -210,7 +210,7 @@
|
||||
/* Avoid depending on library functions or files
|
||||
whose names are inconsistent. */
|
||||
|
||||
-char *getenv ();
|
||||
+char *getenv (const char *name);
|
||||
|
||||
static char *
|
||||
my_index (str, chr)
|
||||
--- a/compat/getopt.h
|
||||
+++ b/compat/getopt.h
|
||||
@@ -99,14 +99,7 @@
|
||||
#define optional_argument 2
|
||||
|
||||
#if defined (__STDC__) && __STDC__
|
||||
-#ifdef __GNU_LIBRARY__
|
||||
-/* 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. */
|
||||
extern int getopt (int argc, char *const *argv, const char *shortopts);
|
||||
-#else /* not __GNU_LIBRARY__ */
|
||||
-extern int getopt ();
|
||||
-#endif /* __GNU_LIBRARY__ */
|
||||
extern int getopt_long (int argc, char *const *argv, const char *shortopts,
|
||||
const struct option *longopts, int *longind);
|
||||
extern int getopt_long_only (int argc, char *const *argv,
|
||||
Reference in New Issue
Block a user