diff options
author | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2018-06-26 19:10:06 -0500 |
---|---|---|
committer | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2018-06-26 19:10:06 -0500 |
commit | ae0d40a7aafef1e14fae03c2bd164509aeeaec55 (patch) | |
tree | bf2b08a212d8e949d89fc45123b4e2a1bf1a34bc /system/libidn/localename-test-fix.patch | |
parent | 577b0d6c3d0c1ee436d1b345805728f0b1908edb (diff) | |
download | packages-ae0d40a7aafef1e14fae03c2bd164509aeeaec55.tar.gz packages-ae0d40a7aafef1e14fae03c2bd164509aeeaec55.tar.bz2 packages-ae0d40a7aafef1e14fae03c2bd164509aeeaec55.tar.xz packages-ae0d40a7aafef1e14fae03c2bd164509aeeaec55.zip |
system/libidn: pull in for perl-net-libidn
Diffstat (limited to 'system/libidn/localename-test-fix.patch')
-rw-r--r-- | system/libidn/localename-test-fix.patch | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/system/libidn/localename-test-fix.patch b/system/libidn/localename-test-fix.patch new file mode 100644 index 000000000..4b77c2a24 --- /dev/null +++ b/system/libidn/localename-test-fix.patch @@ -0,0 +1,34 @@ +--- libidn-1.33/lib/gltests/localename.c.old 2016-12-31 13:54:43.000000000 +0000 ++++ libidn-1.33/lib/gltests/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__ + # 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 <https://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 __DragonFly__) || (defined __APPLE__ && defined __MACH__) + /* FreeBSD, Mac OS X */ |