Got it. In that case, I'll send a change to update the opr_containerof() macro to also work with clang.

Thanks,
Bjorn 

On Tue, Nov 16, 2021 at 1:18 AM Daniel Gryniewicz <dang@redhat.com> wrote:
opr_containerof() is part of the rbtree implementation in NTIRPC.  It's
used by any user of ntirpc's rbtree.  It cannot be removed, but can be
replaced with a functionally equivalent implementation.  It's only used
in Ganesha as part of the rbtree.

I'd prefer not to unify the various container_of implementations.
They're part of different APIs.  Making them all work with all
compilers, however, is a good goal.

Daniel

On 11/14/21 5:02 PM, Bjorn Leffler via Devel wrote:
> I have compiled ntirpc, NFS Ganesha and all dependencies with clang.
> When I try to run the code, I get a SIGILL signal triggered from the
> "opr_containerof" macro in ntirpc/ntirpc/misc/opr.h.
>
> I'd like to fix this. My preferred option would be to unify the ntirpc
> "opr_containerof" and Ganesha "container_of" macros into a single
> "container_of" macro. A macro that's defined once (in ntirpc) and that
> compiles and runs with both gcc and clang.
>
> I've got a few questions around all this. First of all, does this sound
> like a good idea? I could simply update the opr_containerof macro, so
> that it also works with clang. What does OPR mean? Is the
> "opr_containerof" macro used anywhere else but Ganesha?
>
> Thanks,
> Bjorn
>
>
> _______________________________________________
> Devel mailing list -- devel@lists.nfs-ganesha.org
> To unsubscribe send an email to devel-leave@lists.nfs-ganesha.org
>
_______________________________________________
Devel mailing list -- devel@lists.nfs-ganesha.org
To unsubscribe send an email to devel-leave@lists.nfs-ganesha.org