summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libc/misc/regex/regcomp.c3
-rw-r--r--libc/stdlib/stdlib.c3
2 files changed, 5 insertions, 1 deletions
diff --git a/libc/misc/regex/regcomp.c b/libc/misc/regex/regcomp.c
index 9d6c78cda..b15109c93 100644
--- a/libc/misc/regex/regcomp.c
+++ b/libc/misc/regex/regcomp.c
@@ -834,6 +834,9 @@ init_dfa (re_dfa_t *dfa, size_t pat_len)
dfa->state_hash_mask = table_size - 1;
#ifdef __UCLIBC_HAS_WCHAR__
+# undef MB_CUR_MAX
+# define MB_CUR_MAX (_stdlib_mb_cur_max_internal ())
+extern size_t _stdlib_mb_cur_max_internal (void) __THROW __wur attribute_hidden;
dfa->mb_cur_max = MB_CUR_MAX;
#else
dfa->mb_cur_max = 1;
diff --git a/libc/stdlib/stdlib.c b/libc/stdlib/stdlib.c
index ab95c9378..8203881a4 100644
--- a/libc/stdlib/stdlib.c
+++ b/libc/stdlib/stdlib.c
@@ -868,7 +868,7 @@ void ssort (void *base,
/**********************************************************************/
#ifdef L__stdlib_mb_cur_max
-size_t _stdlib_mb_cur_max(void)
+size_t attribute_hidden _stdlib_mb_cur_max_internal(void)
{
#ifdef __CTYPE_HAS_UTF_8_LOCALES
return __UCLIBC_CURLOCALE_DATA.mb_cur_max;
@@ -881,6 +881,7 @@ size_t _stdlib_mb_cur_max(void)
return 1;
#endif
}
+strong_alias(_stdlib_mb_cur_max_internal,_stdlib_mb_cur_max)
#endif
/**********************************************************************/