From 41845000b4c4bb13986f9b95b5dc67c309dd1bdc Mon Sep 17 00:00:00 2001 From: Michael Jeanson Date: Thu, 5 Aug 2021 16:48:51 -0400 Subject: [PATCH] fix: wrong define used for GCC version check MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- include/lttng/constant.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/lttng/constant.h b/include/lttng/constant.h index faa582f77..1b6f44d8b 100644 --- a/include/lttng/constant.h +++ b/include/lttng/constant.h @@ -10,8 +10,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)) -- 2.34.1