summaryrefslogtreecommitdiff
path: root/x11-misc/lightdm/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-09-01 19:24:10 +0100
committerV3n3RiX <venerix@koprulu.sector>2022-09-01 19:24:10 +0100
commitb052fbf151106a4f47cac7fdf0ffff983decb773 (patch)
tree5d21279a4eeaf4076caee87654b610a0fe8a4051 /x11-misc/lightdm/files
parentc3b55a6be7da027d97d8aef00ef88c3011121a42 (diff)
gentoo auto-resync : 01:09:2022 - 19:24:10
Diffstat (limited to 'x11-misc/lightdm/files')
-rw-r--r--x11-misc/lightdm/files/lightdm-1.30.0-musl-locale.patch42
-rw-r--r--x11-misc/lightdm/files/lightdm-1.30.0-musl-updwtmpx.patch26
2 files changed, 68 insertions, 0 deletions
diff --git a/x11-misc/lightdm/files/lightdm-1.30.0-musl-locale.patch b/x11-misc/lightdm/files/lightdm-1.30.0-musl-locale.patch
new file mode 100644
index 000000000000..46c65d79f764
--- /dev/null
+++ b/x11-misc/lightdm/files/lightdm-1.30.0-musl-locale.patch
@@ -0,0 +1,42 @@
+https://github.com/canonical/lightdm/pull/261
+
+# Fix LC_IDENTIFICATION undeclared on musl or other libc that doesn't have it defined
+# Patch is taken from Alpine linux [1]
+# [1]: https://git.alpinelinux.org/aports/tree/community/lightdm/musl-language.patch
+# Closes: https://bugs.gentoo.org/766866
+diff --git a/liblightdm-gobject/language.c b/liblightdm-gobject/language.c
+index 3d4fa96..e38f5ce 100644
+--- a/liblightdm-gobject/language.c
++++ b/liblightdm-gobject/language.c
+@@ -210,6 +210,7 @@ lightdm_language_get_name (LightDMLanguage *language)
+
+ if (!priv->name)
+ {
++#if HAVE_LC_IDENTIFICATION
+ g_autofree gchar *locale = get_locale_name (priv->code);
+ if (locale)
+ {
+@@ -223,6 +224,7 @@ lightdm_language_get_name (LightDMLanguage *language)
+
+ setlocale (LC_ALL, current);
+ }
++#endif
+ if (!priv->name)
+ {
+ g_auto(GStrv) tokens = g_strsplit_set (priv->code, "_.@", 2);
+@@ -250,6 +252,7 @@ lightdm_language_get_territory (LightDMLanguage *language)
+
+ if (!priv->territory && strchr (priv->code, '_'))
+ {
++#if HAVE_LC_IDENTIFICATION
+ g_autofree gchar *locale = get_locale_name (priv->code);
+ if (locale)
+ {
+@@ -263,6 +266,7 @@ lightdm_language_get_territory (LightDMLanguage *language)
+
+ setlocale (LC_ALL, current);
+ }
++#endif
+ if (!priv->territory)
+ {
+ g_auto(GStrv) tokens = g_strsplit_set (priv->code, "_.@", 3);
diff --git a/x11-misc/lightdm/files/lightdm-1.30.0-musl-updwtmpx.patch b/x11-misc/lightdm/files/lightdm-1.30.0-musl-updwtmpx.patch
new file mode 100644
index 000000000000..0df9bd4f051e
--- /dev/null
+++ b/x11-misc/lightdm/files/lightdm-1.30.0-musl-updwtmpx.patch
@@ -0,0 +1,26 @@
+https://github.com/canonical/lightdm/pull/261
+
+# A little bit modified version of Alpine linux patch [1]. On musl the default
+# implementation of updwtmpx will give conflicting types error and build will
+# fail. This patch should fix that. This issue is noticed together with bug
+# 766866 [2].
+# [1]: https://git.alpinelinux.org/aports/tree/community/lightdm/musl-updwtmpx.patch
+# [2]: https://bugs.gentoo.org/766866
+diff --git a/src/session-child.c b/src/session-child.c
+index eef51e4..0052904 100644
+--- a/src/session-child.c
++++ b/src/session-child.c
+@@ -193,8 +193,13 @@ read_xauth (void)
+ }
+
+ /* GNU provides this but we can't rely on that so let's make our own version */
++#if defined(__GLIBC__)
+ static void
+ updwtmpx (const gchar *wtmp_file, struct utmpx *ut)
++#else // use this version in libc's other than glibc
++void
++updwtmpx (const char *wtmp_file, const struct utmpx *ut)
++#endif
+ {
+ struct utmp u;
+ memset (&u, 0, sizeof (u));