From 46e0ea33e2fe8d2f8a8df214bf0484b2b46e1fdf Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Thu, 4 May 2023 08:09:02 +0200 Subject: [PATCH] DEV: haring: automatically disable DEBUG_STRICT Ideally haring should be compiled with the same options as haproxy so that ring headers have the same size (e.g. with/without locks, with/ without lock debugging). But when enabling DEBUG_STRICT, BUG_ON() is enabled and breaks the build by making references to complain() and ha_backtrace_to_stderr(). Let's just disable DEBUG_STRICT before opening include files. This is sufficient to address the problem. This may be backorted to older versions that include haring. --- dev/haring/haring.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dev/haring/haring.c b/dev/haring/haring.c index 4b09c9e09..df455be73 100644 --- a/dev/haring/haring.c +++ b/dev/haring/haring.c @@ -23,6 +23,8 @@ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * OTHER DEALINGS IN THE SOFTWARE. */ +/* we do not implement BUG_ON() */ +#undef DEBUG_STRICT #include #include