diff --git a/src/common/compat.h b/src/common/compat.h index 7cfb6a5e45..b7eaf75ea3 100644 --- a/src/common/compat.h +++ b/src/common/compat.h @@ -13,7 +13,7 @@ #define WIN32_WINNT 0x400 #define _WIN32_WINNT 0x400 #define WIN32_LEAN_AND_MEAN -#if (_MSC_VER <= 1300) +#if defined(_MSC_VER) && (_MSC_VER <= 1300) #include #else #include diff --git a/src/common/util.c b/src/common/util.c index b042963c57..a16d41fad7 100644 --- a/src/common/util.c +++ b/src/common/util.c @@ -541,7 +541,7 @@ tor_parse_uint64(const char *s, int base, uint64_t min, #ifdef HAVE_STRTOULL r = (uint64_t)strtoull(s, &endptr, base); #elif defined(MS_WINDOWS) -#if _MSC_VER < 1300 +#if defined(_MSC_VER) && _MSC_VER < 1300 tor_assert(base <= 10); r = (uint64_t)_atoi64(s); endptr = (char*)s; diff --git a/src/tools/tor-resolve.c b/src/tools/tor-resolve.c index f24bff497b..25a14a4660 100644 --- a/src/tools/tor-resolve.c +++ b/src/tools/tor-resolve.c @@ -31,7 +31,7 @@ #endif #ifdef MS_WINDOWS -#if (_MSC_VER <= 1300) +#if defined(_MSC_VER) && (_MSC_VER <= 1300) #include #else #include