[3/4] i18n.c: _nl_msg_cat_cntr is an internal symbol of some intl implementation
Commit Message
From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
It is supported by glibc and uClibc (which both define __GLIBC__) but
not musl (which doesn't define __GLIBC__). On musl, it doesn't do
anything because musl has a basic NLS implementation. Even
gettext-tiny defines _nl_msg_cat_cntr as a dummy symbol in its stub
libintl-musl implementation.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
---
i18n.c | 2 ++
1 file changed, 2 insertions(+)
@@ -124,8 +124,10 @@ static const char *SkipContext(const char *s)
static void SetEnvLanguage(const char *Locale)
{
setenv("LANGUAGE", Locale, 1);
+#if defined(__GLIBC__)
extern int _nl_msg_cat_cntr;
++_nl_msg_cat_cntr;
+#endif
}
static void SetLanguageNames(void)