Quellcode durchsuchen

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

* Fix compilation error when MSVC is not set to C11 standard
vkensou vor 1 Tag
Ursprung
Commit
2a337c4710
1 geänderte Dateien mit 3 neuen und 0 gelöschten Zeilen
  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