summaryrefslogtreecommitdiff
path: root/system/coreutils/localename-test-fix.patch
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2018-06-08 02:02:24 -0500
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2018-06-08 02:02:24 -0500
commitfd2bb2f751c13b3c0c002b8e012810902b9da364 (patch)
tree17b2e38c966c9f96cfa568c1f572261a289590e6 /system/coreutils/localename-test-fix.patch
parentb0a5136bf3326ba38b360be288d06f9a27f2a4d2 (diff)
downloadpackages-fd2bb2f751c13b3c0c002b8e012810902b9da364.tar.gz
packages-fd2bb2f751c13b3c0c002b8e012810902b9da364.tar.bz2
packages-fd2bb2f751c13b3c0c002b8e012810902b9da364.tar.xz
packages-fd2bb2f751c13b3c0c002b8e012810902b9da364.zip
harmony -> system
Diffstat (limited to 'system/coreutils/localename-test-fix.patch')
-rw-r--r--system/coreutils/localename-test-fix.patch34
1 files changed, 34 insertions, 0 deletions
diff --git a/system/coreutils/localename-test-fix.patch b/system/coreutils/localename-test-fix.patch
new file mode 100644
index 000000000..f90d11866
--- /dev/null
+++ b/system/coreutils/localename-test-fix.patch
@@ -0,0 +1,34 @@
+--- coreutils-8.27/gnulib-tests/localename.c.old 2016-12-31 13:54:43.000000000 +0000
++++ coreutils-8.27/gnulib-tests/localename.c 2017-07-30 16:40:47.098541270 +0000
+@@ -40,7 +40,7 @@
+ # if defined __APPLE__ && defined __MACH__
+ # include <xlocale.h>
+ # endif
+-# if (__GLIBC__ >= 2 && !defined __UCLIBC__) || defined __CYGWIN__
++# if (defined __linux__ && !defined __UCLIBC__) || defined __CYGWIN__
+ # include <langinfo.h>
+ # endif
+ # if !defined IN_LIBINTL
+@@ -2692,16 +2692,19 @@
+ locale_t thread_locale = uselocale (NULL);
+ if (thread_locale != LC_GLOBAL_LOCALE)
+ {
+-# if __GLIBC__ >= 2 && !defined __UCLIBC__
++# if defined(_NL_LOCALE_NAME)
++ const char *name = nl_langinfo(_NL_LOCALE_NAME(category));
++# if __GLIBC__ >= 2 && !defined __UCLIBC__
+ /* Work around an incorrect definition of the _NL_LOCALE_NAME macro in
+ glibc < 2.12.
+ See <http://sourceware.org/bugzilla/show_bug.cgi?id=10968>. */
+- const char *name =
+- nl_langinfo (_NL_ITEM ((category), _NL_ITEM_INDEX (-1)));
++ if (name[0] == '\0')
++ name = nl_langinfo (_NL_ITEM ((category), _NL_ITEM_INDEX (-1)));
+ if (name[0] == '\0')
+ /* Fallback code for glibc < 2.4, which did not implement
+ nl_langinfo (_NL_LOCALE_NAME (category)). */
+ name = thread_locale->__names[category];
++# endif
+ return name;
+ # elif defined __FreeBSD__ || (defined __APPLE__ && defined __MACH__)
+ /* FreeBSD, Mac OS X */