On Thu, Apr 4, 2019 at 3:11 AM Iain Sandoe <idsan...@googlemail.com> wrote:
> Hi Eric, > > Thanks for working on this! > > > On 4 Apr 2019, at 04:00, Erik Schnetter <schnet...@gmail.com> wrote: > > > > Fixinclude the header file <sys/ucred.h> that incorrectly uses the C-only > > _Atomic keyword when compiled as C++. Apply the same work-around for two > > GCC source files that transitively use this header file. > > 1/ > If the fix-include is doing the right thing, then there should be no need > for a > workaround in any GCC file including it. > > Perhaps the wrap needs to be around the (SDK) header(s) that is/are > including <sys/ucred.h>? > > (so if <sys/sysctl.h> is including <sys/ucred.h>, then the wrap needs to > be in that > file, not in the GCC files that use it). > Okay, that's good to know. I will update the patch accordingly. 2/ > I’m somewhat unhappy that this will hack around the problem and silently do > something that can’t work properly in any case that we started to use the > field/struct. What didn’t work about your proposed substitution of the > appropriate > c++ <atomic> stuff? > What doesn't work was that this requires changing <sys/ucred.h>. If only <sys/sysctl.h> can be changed, then it is not possible to replace _Atomic ulong by _Atomic(ulong) (adding parentheses). I'll try fixincluding both files. -erik -- Erik Schnetter <schnet...@gmail.com> http://www.perimeterinstitute.ca/personal/eschnetter/