Index: llvm-toolchain-snapshot_17~++20230530094321+b187215a44f7/libcxx/include/__mbstate_t.h =================================================================== --- llvm-toolchain-snapshot_17~++20230530094321+b187215a44f7.orig/libcxx/include/__mbstate_t.h +++ llvm-toolchain-snapshot_17~++20230530094321+b187215a44f7/libcxx/include/__mbstate_t.h @@ -35,7 +35,11 @@ # define __CORRECT_ISO_CPP_WCHAR_H_PROTO #endif -#if __has_include() + +#if __has_include() // Probe for musl +#define __NEED_mbstate_t // Tell musl we need __mbstate_t (and nothing else) +#include +#elif __has_include() # include // works on most Unixes #elif __has_include() # include // works on Darwin