From: Michael Jeanson Date: Thu, 5 Aug 2021 20:48:51 +0000 (-0400) Subject: fix: wrong define used for GCC version check X-Git-Tag: v2.11.8~7 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=6ecf04f64d17fedf74ea881a4284edcfee87ec97;p=lttng-tools.git fix: wrong define used for GCC version check As far as I can tell, the __GNUC_MAJOR__ define has never existed, the proper define for the major version is __GNUC__. See https://gcc.gnu.org/onlinedocs/cpp/Common-Predefined-Macros.html for more details. Change-Id: I0d47d524e7efd204fd2f8976311c62e872eb6170 Signed-off-by: Michael Jeanson Signed-off-by: Jérémie Galarneau --- diff --git a/include/lttng/constant.h b/include/lttng/constant.h index 1235c346f..1d35652f7 100644 --- a/include/lttng/constant.h +++ b/include/lttng/constant.h @@ -20,8 +20,8 @@ #ifndef LTTNG_DEPRECATED #if defined (__GNUC__) \ - && ((__GNUC_MAJOR__ == 4) && (__GNUC_MINOR__ >= 5) \ - || __GNUC_MAJOR__ >= 5) + && ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5) \ + || __GNUC__ >= 5) #define LTTNG_DEPRECATED(msg) __attribute__((deprecated(msg))) #else #define LTTNG_DEPRECATED(msg) __attribute__((deprecated))