about summary refs log tree commit diff
path: root/locale/setlocale.c
diff options
context:
space:
mode:
Diffstat (limited to 'locale/setlocale.c')
-rw-r--r--locale/setlocale.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/locale/setlocale.c b/locale/setlocale.c
index 1944336004..c64db08f05 100644
--- a/locale/setlocale.c
+++ b/locale/setlocale.c
@@ -307,7 +307,14 @@ setlocale (int category, const char *locale)
 						 &newnames[category]);
 
 	    if (newdata[category] == NULL)
-	      break;
+	      {
+#ifdef NL_CURRENT_INDIRECT
+		if (newnames[category] == _nl_C_name)
+		  /* Null because it's the weak value of _nl_C_LC_FOO.  */
+		  continue;
+#endif
+		break;
+	      }
 
 	    /* We must not simply free a global locale since we have no
 	       control over the usage.  So we mark it as un-deletable.  */