diff --git a/compiler-rt/BlocksRuntime/Block_private.h b/compiler-rt/BlocksRuntime/Block_private.h index 7b069d8997a7..8ae821815ebe 100644 --- a/compiler-rt/BlocksRuntime/Block_private.h +++ b/compiler-rt/BlocksRuntime/Block_private.h @@ -33,7 +33,14 @@ # endif #endif +#ifndef _MSC_VER #include +#else +/* MSVC doesn't have . Compensate. */ +typedef char bool; +#define true (bool)1 +#define false (bool)0 +#endif #if defined(__cplusplus) extern "C" { diff --git a/compiler-rt/BlocksRuntime/runtime.c b/compiler-rt/BlocksRuntime/runtime.c index dae06321f6e7..a059c2234df1 100644 --- a/compiler-rt/BlocksRuntime/runtime.c +++ b/compiler-rt/BlocksRuntime/runtime.c @@ -27,7 +27,6 @@ #include #include #include -#include #include "config.h" @@ -45,7 +44,7 @@ #include #endif /* HAVE_LIBKERN_OSATOMIC_H */ -#elif defined(__WIN32__) +#elif defined(__WIN32__) || defined(_WIN32) #define _CRT_SECURE_NO_WARNINGS 1 #include