diff --git a/src/hotspot/share/utilities/forbiddenFunctions.hpp b/src/hotspot/share/utilities/forbiddenFunctions.hpp index a8dcba95a6d..871fff5b727 100644 --- a/src/hotspot/share/utilities/forbiddenFunctions.hpp +++ b/src/hotspot/share/utilities/forbiddenFunctions.hpp @@ -38,6 +38,15 @@ #include #endif +// Workaround for noexcept functions in glibc when using clang. +// clang errors if declaration without exception specification preceeds +// noexcept declaration, but not the other way around. +#ifdef __clang__ +#include +#include +#include +#endif + #ifdef _WINDOWS #include "forbiddenFunctions_windows.hpp" #else