diff --git a/upb/port_def.inc b/upb/port_def.inc index 4cd082589a..2cd1bb6985 100644 --- a/upb/port_def.inc +++ b/upb/port_def.inc @@ -21,12 +21,10 @@ * This file is private and must not be included by users! */ -#if !(__STDC_VERSION__ >= 199901L || __cplusplus >= 201103L) -#error upb requires C99 or C++11 -#endif - -#if (defined(_MSC_VER) && _MSC_VER < 1900) -#error upb requires MSVC >= 2015. +#if !((defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || \ + (defined(__cplusplus) && __cplusplus >= 201103L) || \ + (defined(_MSC_VER) && _MSC_VER >= 1900)) +#error upb requires C99 or C++11 or MSVC >= 2015. #endif #include