Hi David,
On Sat, Sep 04, 2021 at 09:01:11AM +0100, David CARLIER wrote:
> Hi here a little fix proposal for this platform.
>
> Cheers.
> From 6cfa1fce839504e04584d1bfedee188bc21c32b1 Mon Sep 17 00:00:00 2001
> From: DC
> Date: Sat, 4 Sep 2021 09:58:57 +0100
> Subject: [PATCH] BUILD/MINOR: dragonfly build fix.
>
> build failure since __read_mostly is undefined.
This seems to contradict the previous patch that touched this area:
commit d272b409d73f71b1a85dcc78b380a6188d194329
Author: Amaury Denoyelle
Date: Fri Apr 23 16:35:13 2021 +0200
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.
As such I suspect that it might depend on the version and that we ought
to avoid relying on the OS but on the root cause of the problem, i.e.
that the macro is already defined. Thus for me the right fix would be
this:
- #if !defined(__DragonFly__)
+ #if !defined(__read_mostly)
#define __read_mostly HA_SECTION("read_mostly")
#endif
Willy