From: Willy Tarreau Date: Sun, 2 Jun 2019 08:38:48 +0000 (+0200) Subject: BUILD: contrib/prometheus: fix build breakage caused by move of idle_pct X-Git-Tag: v2.0-dev5~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=76824a8c99c69fad7e70b0914c21ac335959771e;p=thirdparty%2Fhaproxy.git BUILD: contrib/prometheus: fix build breakage caused by move of idle_pct The idle_pct thread-local variable was moved to struct thread_info by commit 81036f2 ("MINOR: time: move the cpu, mono, and idle time to thread_info") but not updated in service-prometheus.c, thus breaking it. No backport is needed. This fixes GH issue #110. --- diff --git a/contrib/prometheus-exporter/service-prometheus.c b/contrib/prometheus-exporter/service-prometheus.c index e6fe1dd84b..3071b8f0fe 100644 --- a/contrib/prometheus-exporter/service-prometheus.c +++ b/contrib/prometheus-exporter/service-prometheus.c @@ -1369,7 +1369,7 @@ static int promex_dump_global_metrics(struct appctx *appctx, struct htx *htx) metric = mkf_u32(0, tasks_run_queue_cur); break; case INF_IDLE_PCT: - metric = mkf_u32(FN_AVG, idle_pct); + metric = mkf_u32(FN_AVG, ti->idle_pct); break; case INF_STOPPING: metric = mkf_u32(0, stopping);