--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/components/ggrep/patches/gnulib-tests_localename_c.patch Wed Jun 03 16:57:58 2015 -0700
@@ -0,0 +1,18 @@
+# This patch fixes the core dump and locale issues previously seen in
+# the test-mbrtowc3.sh, test-mbrtowc4.sh and test-mbsrtowcs4.sh tests.
+# __getlocalename_l is an Oracle private interface.
+# Do not send this patch upstream.
+
+diff -rup grep-2.20-orig/gnulib-tests/localename.c grep-2.20/gnulib-tests/localename.c
+--- grep-2.20-orig/gnulib-tests/localename.c 2014-01-01 17:36:42.000000000 -0800
++++ grep-2.20/gnulib-tests/localename.c 2015-05-28 14:48:57.639643024 -0700
+@@ -2644,6 +2644,9 @@ gl_locale_name_thread_unsafe (int catego
+ return "";
+ }
+ return querylocale (mask, thread_locale);
++# elif defined(sun) || defined(__sun) || defined(__sun__)
++ extern char * __getlocalename_l(int, locale_t);
++ return __getlocalename_l (category, thread_locale);
+ # endif
+ }
+ }