From: Willy Tarreau Date: Wed, 2 Apr 2025 09:36:43 +0000 (+0200) Subject: BUILD: compiler: undefine the CONCAT() macro if already defined X-Git-Tag: v3.2-dev9~18 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4ec5509541e29956107011d45c971a9fe3a430f1;p=thirdparty%2Fhaproxy.git 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. --- diff --git a/include/haproxy/compiler.h b/include/haproxy/compiler.h index fc7679e8a..7d42375b3 100644 --- a/include/haproxy/compiler.h +++ b/include/haproxy/compiler.h @@ -284,6 +284,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)