void-packages/srcpkgs/lightdm/patches/musl-language.patch

35 lines
994 B
Diff

--- ./liblightdm-gobject/language.c.orig 2015-09-08 14:44:54.377669101 -0400
+++ ./liblightdm-gobject/language.c 2015-09-08 14:45:12.453668549 -0400
@@ -224,6 +224,7 @@
if (!priv->name)
{
+#if HAVE_LC_IDENTIFICATION
gchar *locale = get_locale_name (priv->code);
if (locale)
{
@@ -238,6 +239,7 @@
setlocale (LC_ALL, current);
}
if (!priv->name)
+#endif
{
gchar **tokens = g_strsplit_set (priv->code, "_.@", 2);
priv->name = g_strdup (tokens[0]);
@@ -267,6 +269,7 @@
if (!priv->territory && strchr (priv->code, '_'))
{
+#if HAVE_LC_IDENTIFICATION
gchar *locale = get_locale_name (priv->code);
if (locale)
{
@@ -281,6 +284,7 @@
setlocale (LC_ALL, current);
}
if (!priv->territory)
+#endif
{
gchar **tokens = g_strsplit_set (priv->code, "_.@", 3);
priv->territory = g_strdup (tokens[1]);