https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117210
--- Comment #13 from Jakub Jelinek <jakub at gcc dot gnu.org> --- (In reply to Dimitry Andric from comment #12) > So, something like this? > > diff --git a/libstdc++-v3/config/os/bsd/freebsd/os_defines.h > b/libstdc++-v3/config/os/bsd/freebsd/os_defines.h > index 0d63ae6cec4..e414524dcc2 100644 > --- a/libstdc++-v3/config/os/bsd/freebsd/os_defines.h > +++ b/libstdc++-v3/config/os/bsd/freebsd/os_defines.h > @@ -26,6 +26,9 @@ > #ifndef _GLIBCXX_OS_DEFINES > #define _GLIBCXX_OS_DEFINES 1 > > +// For __ISO_C_VISIBLE and __LONG_LONG_SUPPORTED > +#include <sys/cdefs.h> > + > // System-specific #define, typedefs, corrections, etc, go here. This > // file will come before all others. > > > I think a similar approach might be needed for NetBSD and/or OpenBSD, btw. Yes. I think for DragonFly, I don't think NetBSD or OpenBSD had something similar (macros with defined inside of it, which with -Wsystem-headers are now warned about).