From: Willy Tarreau Date: Mon, 9 May 2022 17:46:35 +0000 (+0200) Subject: BUILD: stats: conditionally mark obsolete stats states as deprecated X-Git-Tag: v2.6-dev10~70 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ecab71fbac3e14ca2f7f4b83081830c6ac9539ba;p=thirdparty%2Fhaproxy.git 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. --- diff --git a/include/haproxy/stats-t.h b/include/haproxy/stats-t.h index 61c756a3e9..efa0ac3839 100644 --- a/include/haproxy/stats-t.h +++ b/include/haproxy/stats-t.h @@ -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 */