diff --git a/include/mongoose.h b/include/mongoose.h
index b885270..5166d1a 100644
--- a/include/mongoose.h
+++ b/include/mongoose.h
@@ -231,7 +231,7 @@
 #include <windows.h>
 #include <process.h>
 
-#if _MSC_VER < 1700
+#if defined(_MSC_VER) && (_MSC_VER < 1700)
 typedef int bool;
 #else
 #include <stdbool.h>
