diff --git a/lib/libc/locale/iswctype.c b/lib/libc/locale/iswctype.c index ef6d4b567416..7e7b3b934b09 100644 --- a/lib/libc/locale/iswctype.c +++ b/lib/libc/locale/iswctype.c @@ -211,3 +211,13 @@ towupper(wc) { return (__toupper(wc)); } + +#undef wcwidth +int +wcwidth(wc) + wchar_t wc; +{ + int width = (unsigned)__maskrune((wc), _CTYPE_SWM) >> _CTYPE_SWS; + return width ? width : iswprint(wc); +} +