aboutsummaryrefslogtreecommitdiff
path: root/newlib/libc
diff options
context:
space:
mode:
authorAlexey Lapshin <alexey.lapshin@espressif.com>2023-05-17 17:44:57 -0400
committerJeff Johnston <jjohnstn@redhat.com>2023-05-17 17:47:54 -0400
commite7858c0a585e29c48a4109933423a0de362fc62d (patch)
treec7be88a8568abf95418faf4e36f71307766659fa /newlib/libc
parent9ae9eef21db51e1e26d43a2c1347de5dc50170fd (diff)
downloadnewlib-e7858c0a585e29c48a4109933423a0de362fc62d.zip
newlib-e7858c0a585e29c48a4109933423a0de362fc62d.tar.gz
newlib-e7858c0a585e29c48a4109933423a0de362fc62d.tar.bz2
fix __time_load_locale return code
- add explicit __HAVE_LOCALE_INFO__ check
Diffstat (limited to 'newlib/libc')
-rw-r--r--newlib/libc/locale/timelocal.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/newlib/libc/locale/timelocal.c b/newlib/libc/locale/timelocal.c
index 4b36154..e3a7fd0 100644
--- a/newlib/libc/locale/timelocal.c
+++ b/newlib/libc/locale/timelocal.c
@@ -147,10 +147,11 @@ int
__time_load_locale (struct __locale_t *locale, const char *name,
void *f_wctomb, const char *charset)
{
- int ret;
+ int ret = 0;
struct lc_time_T ti;
char *bufp = NULL;
+#ifdef __HAVE_LOCALE_INFO__
#ifdef __CYGWIN__
extern int __set_lc_time_from_win (const char *, const struct lc_time_T *,
struct lc_time_T *, char **, void *,
@@ -186,5 +187,6 @@ __time_load_locale (struct __locale_t *locale, const char *name,
#else
/* TODO */
#endif
+#endif /* __HAVE_LOCALE_INFO__ */
return (ret);
}