Apple - Compilation error with Mojave: error: ‘_Atomic’ does not name a type
I encountered the same problem myself. The error is actually reported by g++, a C++ compiler. On MacOS 10.14.4, the header file <sys/ucred.h>
uses the _Atomic
keyword for C++, although it is only defined in the C standard. (I assume that Apple's compiler clang++
defines this keyword as extension to the C++ standard.)
The proper fix is to tell gcc to "fixinclude" the header file <sys/ucred.h>
. This patch does this. This is a patch that needs to be applied to the source code of GCC 8.3.0 before building it.