diff --git a/debian/patches/mbstate_workaround_issue_62523.diff b/debian/patches/mbstate_workaround_issue_62523.diff index 3a64c3d7..32b52455 100644 --- a/debian/patches/mbstate_workaround_issue_62523.diff +++ b/debian/patches/mbstate_workaround_issue_62523.diff @@ -1,14 +1,17 @@ -Index: llvm-toolchain-snapshot_17~++20230517080653+e9a17453ee55/libcxx/include/wchar.h +Index: llvm-toolchain-snapshot_17~++20230530094321+b187215a44f7/libcxx/include/__mbstate_t.h =================================================================== ---- llvm-toolchain-snapshot_17~++20230517080653+e9a17453ee55.orig/libcxx/include/wchar.h -+++ llvm-toolchain-snapshot_17~++20230517080653+e9a17453ee55/libcxx/include/wchar.h -@@ -122,6 +122,8 @@ size_t wcsrtombs(char* restrict dst, con - #define __CORRECT_ISO_CPP_WCHAR_H_PROTO +--- 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 - -+#define __DEFINED_mbstate_t + +-#if __has_include() + - # if __has_include_next() - # include_next - # else - ++#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