Skip to content

Commit e7858c0

Browse files
Lapshinjjohnstn
authored andcommitted
fix __time_load_locale return code
- add explicit __HAVE_LOCALE_INFO__ check
1 parent 9ae9eef commit e7858c0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Diff for: newlib/libc/locale/timelocal.c

+3-1
Original file line numberDiff line numberDiff line change
@@ -147,10 +147,11 @@ int
147147
__time_load_locale (struct __locale_t *locale, const char *name,
148148
void *f_wctomb, const char *charset)
149149
{
150-
int ret;
150+
int ret = 0;
151151
struct lc_time_T ti;
152152
char *bufp = NULL;
153153

154+
#ifdef __HAVE_LOCALE_INFO__
154155
#ifdef __CYGWIN__
155156
extern int __set_lc_time_from_win (const char *, const struct lc_time_T *,
156157
struct lc_time_T *, char **, void *,
@@ -186,5 +187,6 @@ __time_load_locale (struct __locale_t *locale, const char *name,
186187
#else
187188
/* TODO */
188189
#endif
190+
#endif /* __HAVE_LOCALE_INFO__ */
189191
return (ret);
190192
}

0 commit comments

Comments
 (0)