aports/community/man-db/ignore.patch
2024-08-30 06:07:13 +00:00

32 lines
1.1 KiB
Diff

musl doesn't support //ignore:
mandb: iconv_open ("UTF-8//IGNORE", "ISO-8859-1"): Invalid argument
so just remove it
--
diff --git a/src/convert.c b/src/convert.c
index 447240c..4f4d006 100644
--- a/src/convert.c
+++ b/src/convert.c
@@ -59,7 +59,7 @@ char * ATTRIBUTE_MALLOC convert_to_locale (char *string)
{
if (!conv_to_locale_initialized) {
char *locale_charset =
- xasprintf ("%s//IGNORE", get_locale_charset ());
+ xasprintf ("%s", get_locale_charset ());
conv_to_locale = iconv_open (locale_charset, "UTF-8");
free (locale_charset);
if (conv_to_locale != (iconv_t) -1)
diff --git a/src/manconv.c b/src/manconv.c
index e775b1b..41a11bd 100644
--- a/src/manconv.c
+++ b/src/manconv.c
@@ -304,7 +304,7 @@ static tried_iconv try_iconv (decompress *decomp, const char *try_from_code,
iconv_t cd_utf8, cd = NULL;
bool to_utf8 = STREQ (try_to_code, "UTF-8") ||
STRNEQ (try_to_code, "UTF-8//", 7);
- const char *utf8_target = last ? "UTF-8//IGNORE" : "UTF-8";
+ const char *utf8_target = "UTF-8";
bool ignore_errors = (strstr (try_to_code, "//IGNORE") != NULL);
tried_iconv ret = TRIED_ICONV_OK;