summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--newlib/libc/locale/locale.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/newlib/libc/locale/locale.c b/newlib/libc/locale/locale.c
index c1970f9a6..795e163e0 100644
--- a/newlib/libc/locale/locale.c
+++ b/newlib/libc/locale/locale.c
@@ -995,7 +995,8 @@ _DEFUN_VOID (__locale_ctype_ptr)
char *
__locale_ctype_ptr_l (struct __locale_t *locale)
{
- return locale->ctype_ptr;
+ extern char *__ctype_ptr__;
+ return locale->ctype_ptr ?: __ctype_ptr__;
}
#ifndef _REENT_ONLY