diff --git a/libcxx/include/__mbstate_t.h b/libcxx/include/__mbstate_t.h --- a/libcxx/include/__mbstate_t.h +++ b/libcxx/include/__mbstate_t.h @@ -35,7 +35,11 @@ # define __CORRECT_ISO_CPP_WCHAR_H_PROTO #endif -#if __has_include() +#if defined(_LIBCPP_HAS_MUSL_LIBC) +# define __NEED_mbstate_t +# include +# undef __NEED_mbstate_t +#elif __has_include() # include // works on most Unixes #elif __has_include() # include // works on Darwin