Просмотр исходного кода

Fix compilation error when MSVC is not set to C11 standard (#4588)

* Fix compilation error when MSVC is not set to C11 standard
vkensou 1 день назад
Родитель
Сommit
2a337c4710
1 измененных файлов с 3 добавлено и 0 удалено
  1. 3 0
      core/shared/platform/include/platform_wasi_types.h

+ 3 - 0
core/shared/platform/include/platform_wasi_types.h

@@ -29,6 +29,9 @@
 #endif /* _Alignof */
 
 extern "C" {
+#elif defined(_MSC_VER) && !_CRT_HAS_C11
+#define _Static_assert static_assert
+#define _Alignof __alignof
 #endif
 
 /* There is no need to check the WASI layout if we're using uvwasi or libc-wasi