From 13c6cf9daaae43c232f4a5d1e49c4db71dfba720 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Wed, 2 Apr 2025 11:36:43 +0200 Subject: [PATCH] BUILD: compiler: undefine the CONCAT() macro if already defined As Ilya reported in issue #2911, the CONCAT() macro breaks on NetBSD which defines its own as __CONCAT() (which is exactly the same). Let's just undefine it before ours to fix the issue instead of renaming, but keep ours so that we don't have doubts about what we're running with. Note that the patch introducing this breaking change was backported to 3.0. (cherry picked from commit 4ec5509541e29956107011d45c971a9fe3a430f1) Signed-off-by: Aurelien DARRAGON (cherry picked from commit bf3252c1d48a63cccee17793b1f24e01409eaf01) Signed-off-by: Aurelien DARRAGON --- include/haproxy/compiler.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/haproxy/compiler.h b/include/haproxy/compiler.h index f60ac51..d17be99 100644 --- a/include/haproxy/compiler.h +++ b/include/haproxy/compiler.h @@ -248,6 +248,7 @@ #define TOSTR(x) _TOSTR(x) /* concatenates the two strings after resolving possible macros */ +#undef CONCAT // Turns out NetBSD defines it to the same in exec_elf.h #define _CONCAT(a,b) a ## b #define CONCAT(a,b) _CONCAT(a,b) -- 1.7.10.4