This is an automated email from the ASF dual-hosted git repository. xiaoxiang pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
The following commit(s) were added to refs/heads/master by this push: new a93b703994 arch/sim/wchar_t: fix visual studio Compiler Error C2371 a93b703994 is described below commit a93b7039949b1b90966d4593314d83a2beaa07fd Author: chao.an <anc...@xiaomi.com> AuthorDate: Wed Aug 24 12:10:38 2022 +0800 arch/sim/wchar_t: fix visual studio Compiler Error C2371 type of 'wchar_t' confilt with vcruntime: C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.33.31629\include\vcruntime.h(228,28): error C2371: 'wchar_t': redefinition; different basic types D:\code\incubator-nuttx\include\sys/types.h(174): message : see decaration of 'wchar_t' typedef wchar_t as unsigned char to compatible with vcrtuntime Signed-off-by: chao.an <anc...@xiaomi.com> --- arch/sim/include/types.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/sim/include/types.h b/arch/sim/include/types.h index da96532137..d347751567 100644 --- a/arch/sim/include/types.h +++ b/arch/sim/include/types.h @@ -88,6 +88,8 @@ typedef _uint64_t _uintmax_t; #if defined(__WCHAR_TYPE__) typedef __WCHAR_TYPE__ _wchar_t; +#elif defined(_MSC_VER) +typedef unsigned short _wchar_t; #else typedef int _wchar_t; #endif