1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-03 01:23:49 +00:00

Fix build with GCC 4.9.

PR:		196712
Submitted by:	kwm
This commit is contained in:
Brooks Davis 2015-10-30 16:50:27 +00:00
parent dc17977dfb
commit 1a9450fce2
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=400548
2 changed files with 29 additions and 0 deletions

View File

@ -2,6 +2,7 @@
PORTNAME= clang
DISTVERSION= 3.6.2
PORTREVISON= 1
CATEGORIES= lang devel
MASTER_SITES= http://llvm.org/releases/3.6.2/
PKGNAMESUFFIX= ${LLVM_SUFFIX}

View File

@ -0,0 +1,28 @@
$FreeBSD$
------------------------------------------------------------------------
r226925 | rnk | 2015-01-23 19:16:25 +0000 (Fri, 23 Jan 2015) | 1 line
Attempt to fix ::sscanf Cygwin build break reported in PR22302
------------------------------------------------------------------------
Index: lib/Driver/MSVCToolChain.cpp
===================================================================
--- tools/clang/lib/Driver/MSVCToolChain.cpp (revision 226924)
+++ tools/clang/lib/Driver/MSVCToolChain.cpp (revision 226925)
@@ -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 @@
"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();
}