fix: wrong define used for GCC version check
authorMichael Jeanson <mjeanson@efficios.com>
Thu, 5 Aug 2021 20:48:51 +0000 (16:48 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 5 Oct 2021 19:32:56 +0000 (15:32 -0400)
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 <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
include/lttng/constant.h

index faa582f7707d6609173b62bd0f45616e685ec455..1b6f44d8bc95e5622019c7dfcec7b65dd7a52aef 100644 (file)
@@ -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))
This page took 0.025865 seconds and 4 git commands to generate.