From: Katharina Bogad <katharina@hacked.xyz> GLIBC defines wcschr, wcsrchr and wcspbrk in their version of wchar.h if C23 is in use. #undef them before ntdll macors are set. --- include/wine/unixlib.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/wine/unixlib.h b/include/wine/unixlib.h index b0fd9b2604d..503bf755f5b 100644 --- a/include/wine/unixlib.h +++ b/include/wine/unixlib.h @@ -255,6 +255,14 @@ NTSYSAPI int ntdll_wcstoumbs( const WCHAR *src, DWORD srclen, char *dst, DWORD d NTSYSAPI int ntdll_wcsicmp( const WCHAR *str1, const WCHAR *str2 ); NTSYSAPI int ntdll_wcsnicmp( const WCHAR *str1, const WCHAR *str2, int n ); +/* C23 requires these functions to be defined as macros to dynamically switch const/mut types. + * undef them to make use of the ntdll_* implementations. + * This intentionally drops the const/mut switching as implementing this requires C11 and + * _Generic to be available. */ +#undef wcschr +#undef wcsrchr +#undef wcspbrk + #define iswspace(ch) ntdll_iswspace(ch) #define wcslen(str) ntdll_wcslen(str) #define wcscpy(dst,src) ntdll_wcscpy(dst,src) -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/10540