From ecab71fbac3e14ca2f7f4b83081830c6ac9539ba Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Mon, 9 May 2022 19:46:35 +0200 Subject: [PATCH] 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. --- include/haproxy/stats-t.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/include/haproxy/stats-t.h b/include/haproxy/stats-t.h index 61c756a3e..efa0ac383 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 */