From d272b409d73f71b1a85dcc78b380a6188d194329 Mon Sep 17 00:00:00 2001 From: Amaury Denoyelle Date: Fri, 23 Apr 2021 16:35:13 +0200 Subject: [PATCH] BUILD: compiler: do not use already defined __read_mostly on dragonfly DragonflyBSD already has an attribute __read_mostly which serves the same purpose as the one in compiler.h. No need to be backported as it was added in the current 2.4-dev. --- include/haproxy/compiler.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/haproxy/compiler.h b/include/haproxy/compiler.h index 72557674c..72d158b37 100644 --- a/include/haproxy/compiler.h +++ b/include/haproxy/compiler.h @@ -89,7 +89,9 @@ #endif // USE_OBSOLETE_LINKER /* use this attribute on a variable to move it to the read_mostly section */ +#if !defined(__DragonFly__) #define __read_mostly HA_SECTION("read_mostly") +#endif /* This allows gcc to know that some locations are never reached, for example * after a longjmp() in the Lua code, hence that some errors caught by such