summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-devel/llvm/files/3.6.2/clang/fbsd-gcc49.patch')
-rw-r--r--sys-devel/llvm/files/3.6.2/clang/fbsd-gcc49.patch25
1 files changed, 25 insertions, 0 deletions
diff --git a/sys-devel/llvm/files/3.6.2/clang/fbsd-gcc49.patch b/sys-devel/llvm/files/3.6.2/clang/fbsd-gcc49.patch
new file mode 100644
index 000000000000..31f5fc2b7f99
--- /dev/null
+++ b/sys-devel/llvm/files/3.6.2/clang/fbsd-gcc49.patch
@@ -0,0 +1,25 @@
+Fix build fails with using gcc-4.9 on Gentoo/FreeBSD
+https://bugs.gentoo.org/show_bug.cgi?id=548444
+
+diff --git a/llvm-3.6.0.src/tools/clang/lib/Driver/MSVCToolChain.cpp b/llvm-3.6.0.src/tools/clang/lib/Driver/MSVCToolChain.cpp
+index d6bd5c3..372f76f 100644
+--- a/llvm-3.6.0.src/tools/clang/lib/Driver/MSVCToolChain.cpp
++++ b/llvm-3.6.0.src/tools/clang/lib/Driver/MSVCToolChain.cpp
+@@ -22,6 +22,8 @@
+ #include "llvm/Support/FileSystem.h"
+ #include "llvm/Support/Process.h"
+
++#include <cstdio>
++
+ // Include the necessary headers to interface with the Windows registry and
+ // environment.
+ #if defined(LLVM_ON_WIN32)
+@@ -212,7 +214,7 @@ bool MSVCToolChain::getWindowsSDKDir(std::string &path, int &major,
+ "SOFTWARE\\Microsoft\\Microsoft SDKs\\Windows\\$VERSION",
+ "InstallationFolder", path, &sdkVersion);
+ if (!sdkVersion.empty())
+- ::sscanf(sdkVersion.c_str(), "v%d.%d", &major, &minor);
++ std::sscanf(sdkVersion.c_str(), "v%d.%d", &major, &minor);
+ return hasSDKDir && !path.empty();
+ }
+