summaryrefslogtreecommitdiff
path: root/system/perl/musl-locale.patch
diff options
context:
space:
mode:
authorZach van Rijn <me@zv.io>2022-01-07 22:03:42 +0000
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2022-05-01 17:05:40 -0500
commit410d3c998735f2db932e18d624d3876e0bfda6e5 (patch)
treedb530c7f8bc6b951f44cced2acf7a097328aea9d /system/perl/musl-locale.patch
parente1866efaaeef8352538c0521ef5e4381fabdcb4a (diff)
downloadpackages-410d3c998735f2db932e18d624d3876e0bfda6e5.tar.gz
packages-410d3c998735f2db932e18d624d3876e0bfda6e5.tar.bz2
packages-410d3c998735f2db932e18d624d3876e0bfda6e5.tar.xz
packages-410d3c998735f2db932e18d624d3876e0bfda6e5.zip
system/perl: bump { 5.26.3 --> 5.34.0 }. add locale patch. enable checks. fixes #296, #435.
Diffstat (limited to 'system/perl/musl-locale.patch')
-rw-r--r--system/perl/musl-locale.patch37
1 files changed, 37 insertions, 0 deletions
diff --git a/system/perl/musl-locale.patch b/system/perl/musl-locale.patch
new file mode 100644
index 000000000..65839f1fe
--- /dev/null
+++ b/system/perl/musl-locale.patch
@@ -0,0 +1,37 @@
+diff --git a/locale.c b/locale.c
+index 7653340..7243cb1 100644
+--- a/locale.c
++++ b/locale.c
+@@ -581,6 +581,10 @@ S_emulate_setlocale(const int category,
+
+ return (char *) querylocale(mask, cur_obj);
+
++# elif defined(_NL_LOCALE_NAME)
++
++ return (char *) nl_langinfo_l(_NL_LOCALE_NAME(category), cur_obj);
++
+ # else
+
+ /* If this assert fails, adjust the size of curlocales in intrpvar.h */
+@@ -737,7 +741,7 @@ S_emulate_setlocale(const int category,
+
+ /* Here, we are switching locales. */
+
+-# ifndef HAS_QUERYLOCALE
++# if !defined(HAS_QUERYLOCALE) && !defined(_NL_LOCALE_NAME)
+
+ if (strEQ(locale, "")) {
+
+@@ -1094,6 +1098,12 @@ S_emulate_setlocale(const int category,
+ locale = querylocale(mask, new_obj);
+ }
+
++# elif defined(_NL_LOCALE_NAME)
++
++ if (strEQ(locale, "")) {
++ locale = nl_langinfo_l(_NL_LOCALE_NAME(category), new_obj);
++ }
++
+ # else
+
+ /* Here, 'locale' is the return value */