diff --git a/src/common.h b/src/common.h index 8759d7d03b..2c3fb763a7 100644 --- a/src/common.h +++ b/src/common.h @@ -78,7 +78,7 @@ #ifndef FASTCALL #ifdef __GNUC__ #define FASTCALL __attribute__((fastcall)) - #elif _MSC_VER + #elif defined(_MSC_VER) #define FASTCALL __fastcall #else #pragma message "Not using fastcall calling convention, please check your compiler support" diff --git a/src/rct2.h b/src/rct2.h index 1d12df5cd1..ce54a41303 100644 --- a/src/rct2.h +++ b/src/rct2.h @@ -131,7 +131,7 @@ typedef uint8 colour_t; #endif // defined(__unix__) || (defined(__APPLE__) && defined(__MACH__)) -#if !(_POSIX_C_SOURCE >= 200809L || _XOPEN_SOURCE >= 700) +#if !((defined (_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 200809L) || (defined(_XOPEN_SOURCE) && _XOPEN_SOURCE >= 700)) char *strndup(const char *src, size_t size); #endif // !(POSIX_C_SOURCE >= 200809L || _XOPEN_SOURCE >= 700)