diff --git a/plugins/clang/duchain/parsesession.cpp b/plugins/clang/duchain/parsesession.cpp --- a/plugins/clang/duchain/parsesession.cpp +++ b/plugins/clang/duchain/parsesession.cpp @@ -145,7 +145,7 @@ if (url.isEmpty()) { continue; } - + QFileInfo info(url.toLocalFile()); QByteArray path = url.toLocalFile().toUtf8(); @@ -280,6 +280,9 @@ smartArgs << writeDefinesFile(environment.defines()); clangArguments << "-imacros" << smartArgs.last().constData(); +#ifdef __FreeBSD__ + clangArguments << "-isystem" << "/usr/include"; +#endif // append extra args from environment variable static const auto extraArgs = ::extraArgs(); foreach (const QByteArray& arg, extraArgs) { diff --git a/plugins/custom-definesandincludes/compilerprovider/gcclikecompiler.cpp b/plugins/custom-definesandincludes/compilerprovider/gcclikecompiler.cpp --- a/plugins/custom-definesandincludes/compilerprovider/gcclikecompiler.cpp +++ b/plugins/custom-definesandincludes/compilerprovider/gcclikecompiler.cpp @@ -191,7 +191,7 @@ // This is an include path, add it to the list. auto hostPath = rt->pathInHost(Path(line.trimmed().toString())); // but skip folders with compiler builtins, we cannot parse these with clang - if (!QFile::exists(hostPath.toLocalFile() + QLatin1String("/varargs.h"))) { + if (!QFile::exists(hostPath.toLocalFile() + QLatin1String("/vadefs.h"))) { data.includePaths << Path(QFileInfo(hostPath.toLocalFile()).canonicalFilePath()); } }