BUILD: stats: conditionally mark obsolete stats states as deprecated

The obsolete stats states STAT_ST_* were marked as deprecated with recent
commit 6ef1648dc ("CLEANUP: stats: rename the stats state values an mark
the old ones deprecated"), except that this feature requires gcc 6 and
above. Let's use the macro that depends on this condition instead.

The issue appeared on 2.6-dev9 so no backport is needed.
This commit is contained in:
Willy Tarreau 2022-05-09 19:46:35 +02:00
parent 4fc2cd7c8e
commit ecab71fbac

View File

@ -135,12 +135,12 @@ enum stat_state {
* please do not use these values anymore and defined your own!
*/
enum obsolete_stat_state {
STAT_ST_INIT __attribute__((deprecated)) = 0,
STAT_ST_HEAD __attribute__((deprecated)),
STAT_ST_INFO __attribute__((deprecated)),
STAT_ST_LIST __attribute__((deprecated)),
STAT_ST_END __attribute__((deprecated)),
STAT_ST_FIN __attribute__((deprecated)),
STAT_ST_INIT ENUM_ATTRIBUTE((deprecated)) = 0,
STAT_ST_HEAD ENUM_ATTRIBUTE((deprecated)),
STAT_ST_INFO ENUM_ATTRIBUTE((deprecated)),
STAT_ST_LIST ENUM_ATTRIBUTE((deprecated)),
STAT_ST_END ENUM_ATTRIBUTE((deprecated)),
STAT_ST_FIN ENUM_ATTRIBUTE((deprecated)),
};
/* data transmission states for the stats responses inside a proxy */