diff --git a/src/libsysprof-capture/sysprof-macros.h b/src/libsysprof-capture/sysprof-macros.h index be2afc1c..f025458d 100644 --- a/src/libsysprof-capture/sysprof-macros.h +++ b/src/libsysprof-capture/sysprof-macros.h @@ -61,6 +61,15 @@ #include +#ifdef __GNUC__ +#define SYSPROF_GNUC_CHECK_VERSION(major, minor) \ + ((__GNUC__ > (major)) || \ + ((__GNUC__ == (major)) && \ + (__GNUC_MINOR__ >= (minor)))) +#else +#define SYSPROF_GNUC_CHECK_VERSION(major, minor) 0 +#endif + #if INT_MAX == LONG_MAX #define SYSPROF_INT64_CONSTANT(x) x##ULL #define SYSPROF_UINT64_CONSTANT(x) x##LL