]> git.kaiwu.me - haproxy.git/commitdiff
BUILD: debug: fix _COUNT undefinied with USE_OBSOLETE_LINKER
authorWilly Tarreau <w@1wt.eu>
Mon, 9 Nov 2026 10:12:01 +0000 (11:12 +0100)
committerWilly Tarreau <w@1wt.eu>
Mon, 9 Nov 2026 10:13:32 +0000 (11:13 +0100)
We recently introduced the COUNT() macro with commit 29925e59a7 ("MINOR:
debug: add a COUNT() macro which doesn't take a condition"). However it
relies on a _COUNT() macro that is not defined when USE_OBSOLETE_LINKER
is used, causing build failures visible in the CI with ASAN builds.
Let's just add it. No backport needed.

include/haproxy/bug.h

index 635f1d4774333eab47ac01af7ae5635c46e2f8e5..cb87f7aaccdc689a1eca40d83c955694e74dd632 100644 (file)
@@ -422,6 +422,7 @@ extern __attribute__((__weak__)) struct debug_count __stop_dbg_cnt  HA_SECTION_S
 # define __DBG_COUNT(cond, file, line, type, ...) do { } while (0)
 # define _COUNT_IF(cond, file, line, ...) DISGUISE(unlikely(cond) ? 1 : 0)
 # define _COUNT_GLITCH(file, line, ...) do { } while (0)
+# define _COUNT(file, line, ...) do { } while (0)
 
 /* This is called by _BUG_ON() and _BUG_ON_ONCE() to handle the event. */
 #define __BUG_ON(cond, file, line, type, details, ...) {               \