diff --git a/include/haproxy/compiler.h b/include/haproxy/compiler.h index dbfcb6228..fcf0d9306 100644 --- a/include/haproxy/compiler.h +++ b/include/haproxy/compiler.h @@ -27,7 +27,7 @@ * Gcc before 3.0 needs [0] to declare a variable-size array */ #ifndef VAR_ARRAY -#if __GNUC__ < 3 +#if defined(__GNUC__) && (__GNUC__ < 3) #define VAR_ARRAY 0 #else #define VAR_ARRAY @@ -39,7 +39,7 @@ * respect our choices. */ #if !defined(forceinline) -#if __GNUC__ < 3 +#if !defined(__GNUC__) || (__GNUC__ < 3) #define forceinline inline #else #define forceinline inline __attribute__((always_inline)) @@ -89,7 +89,7 @@ * generally better for the cache and to reduce the number of jumps. */ #if !defined(likely) -#if __GNUC__ < 3 +#if !defined(__GNUC__) || (__GNUC__ < 3) #define __builtin_expect(x,y) (x) #define likely(x) (x) #define unlikely(x) (x)