diff -Naurd mpfr-3.1.5-a/PATCHES mpfr-3.1.5-b/PATCHES
--- mpfr-3.1.5-a/PATCHES	2017-06-06 20:24:00.580702002 +0000
+++ mpfr-3.1.5-b/PATCHES	2017-06-06 20:24:00.604701719 +0000
@@ -0,0 +1 @@
+tsprintf-setlocale
diff -Naurd mpfr-3.1.5-a/VERSION mpfr-3.1.5-b/VERSION
--- mpfr-3.1.5-a/VERSION	2017-06-06 20:17:02.513703814 +0000
+++ mpfr-3.1.5-b/VERSION	2017-06-06 20:24:00.604701719 +0000
@@ -1 +1 @@
-3.1.5-p6
+3.1.5-p7
diff -Naurd mpfr-3.1.5-a/src/mpfr.h mpfr-3.1.5-b/src/mpfr.h
--- mpfr-3.1.5-a/src/mpfr.h	2017-06-06 20:17:02.513703814 +0000
+++ mpfr-3.1.5-b/src/mpfr.h	2017-06-06 20:24:00.604701719 +0000
@@ -27,7 +27,7 @@
 #define MPFR_VERSION_MAJOR 3
 #define MPFR_VERSION_MINOR 1
 #define MPFR_VERSION_PATCHLEVEL 5
-#define MPFR_VERSION_STRING "3.1.5-p6"
+#define MPFR_VERSION_STRING "3.1.5-p7"
 
 /* Macros dealing with MPFR VERSION */
 #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
diff -Naurd mpfr-3.1.5-a/src/version.c mpfr-3.1.5-b/src/version.c
--- mpfr-3.1.5-a/src/version.c	2017-06-06 20:17:02.513703814 +0000
+++ mpfr-3.1.5-b/src/version.c	2017-06-06 20:24:00.604701719 +0000
@@ -25,5 +25,5 @@
 const char *
 mpfr_get_version (void)
 {
-  return "3.1.5-p6";
+  return "3.1.5-p7";
 }
diff -Naurd mpfr-3.1.5-a/tests/tsprintf.c mpfr-3.1.5-b/tests/tsprintf.c
--- mpfr-3.1.5-a/tests/tsprintf.c	2016-12-15 08:35:46.520430308 +0000
+++ mpfr-3.1.5-b/tests/tsprintf.c	2017-06-06 20:24:00.596701813 +0000
@@ -1273,13 +1273,12 @@
 int
 main (int argc, char **argv)
 {
-  char *locale;
 
   tests_start_mpfr ();
 
 #if defined(HAVE_LOCALE_H) && defined(HAVE_SETLOCALE)
   /* currently, we just check with 'C' locale */
-  locale = setlocale (LC_ALL, "C");
+  setlocale (LC_ALL, "C");
 #endif
 
   bug20111102 ();
@@ -1297,7 +1296,7 @@
   locale_da_DK ();
   /* Avoid a warning by doing the setlocale outside of this #if */
 #endif
-  setlocale (LC_ALL, locale);
+  setlocale (LC_ALL, "C");
 #endif
 
   if (getenv ("MPFR_CHECK_LIBC_PRINTF"))
