diff options
Diffstat (limited to 'app-arch/rpm/files/rpm-4.18.1-musl-nls.patch')
-rw-r--r-- | app-arch/rpm/files/rpm-4.18.1-musl-nls.patch | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/app-arch/rpm/files/rpm-4.18.1-musl-nls.patch b/app-arch/rpm/files/rpm-4.18.1-musl-nls.patch new file mode 100644 index 000000000000..7d1fde28bacf --- /dev/null +++ b/app-arch/rpm/files/rpm-4.18.1-musl-nls.patch @@ -0,0 +1,42 @@ +https://bugs.gentoo.org/888954 +https://github.com/rpm-software-management/rpm/commit/f401979a4c4829d68e9614860644bdb74b6dda66 + +From da222f0d82721d17e57d491d2749a4bc44754b9d Mon Sep 17 00:00:00 2001 +From: Takuya Wakazono <pastalian46@gmail.com> +Date: Thu, 18 Jan 2024 18:41:11 +0900 +Subject: [PATCH] Don't use _nl_msg_cat_cntr if __GLIC__ is not defined + +musl doesn't need to use libintl from GNU gettext because it has its +own NLS implementation. Assuming _nl_msg_cat_cntr exists breaks the +build against the musl system. +--- a/lib/tagexts.c ++++ b/lib/tagexts.c +@@ -532,7 +532,7 @@ static int filerequireTag(Header h, rpmtd td, headerGetFlags hgflags) + + /* I18N look aside diversions */ + +-#if defined(ENABLE_NLS) ++#if defined(ENABLE_NLS) && (defined(__GLIBC__) || !defined(__linux__)) + extern int _nl_msg_cat_cntr; /* XXX GNU gettext voodoo */ + #endif + static const char * const language = "LANGUAGE"; +@@ -569,7 +569,9 @@ static int i18nTag(Header h, rpmTag tag, rpmtd td, headerGetFlags hgflags) + /* change to en_US for msgkey -> msgid resolution */ + langval = getenv(language); + (void) setenv(language, "en_US", 1); ++#if defined(__GLIBC__) || !defined(__linux__) + ++_nl_msg_cat_cntr; ++#endif + + msgid = NULL; + for (domain = dstring; domain != NULL; domain = de) { +@@ -584,7 +586,9 @@ static int i18nTag(Header h, rpmTag tag, rpmtd td, headerGetFlags hgflags) + (void) setenv(language, langval, 1); + else + unsetenv(language); ++#if defined(__GLIBC__) || !defined(__linux__) + ++_nl_msg_cat_cntr; ++#endif + + if (domain && msgid) { + td->data = dgettext(domain, msgid); |