diff options
Diffstat (limited to 'newlib')
-rw-r--r-- | newlib/libc/locale/newlocale.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/newlib/libc/locale/newlocale.c b/newlib/libc/locale/newlocale.c index 08f29dbcc..278f78ed2 100644 --- a/newlib/libc/locale/newlocale.c +++ b/newlib/libc/locale/newlocale.c @@ -171,7 +171,10 @@ _newlocale_r (struct _reent *p, int category_mask, const char *locale, continue; /* Otherwise load locale data. */ else if (!__loadlocale (&tmp_locale, i, new_categories[i])) - goto error; + { + p->_errno = ENOENT; + goto error; + } } } /* Allocate new locale_t. */ |