diff options
author | Michael J. Spencer <bigcheesegs@gmail.com> | 2012-11-01 00:34:09 +0000 |
---|---|---|
committer | Michael J. Spencer <bigcheesegs@gmail.com> | 2012-11-01 00:34:09 +0000 |
commit | 08e712b9ff4ab1aa560357e780ecf3e366b3178b (patch) | |
tree | 11993fa82573146d998e56c17c683e4b96b26e15 /lib/Support | |
parent | ad0b3b21e3abea7a9e9918ae1724f7dd7376b2cf (diff) |
[Support] Fix StrError on Windows to actually return the error string...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167191 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support')
-rw-r--r-- | lib/Support/Errno.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Support/Errno.cpp b/lib/Support/Errno.cpp index 00be43b750..730220f47d 100644 --- a/lib/Support/Errno.cpp +++ b/lib/Support/Errno.cpp @@ -53,8 +53,10 @@ std::string StrError(int errnum) { str = buffer; # endif #elif HAVE_DECL_STRERROR_S // "Windows Secure API" - if (errnum) + if (errnum) { strerror_s(buffer, MaxErrStrLen - 1, errnum); + str = buffer; + } #elif defined(HAVE_STRERROR) // Copy the thread un-safe result of strerror into // the buffer as fast as possible to minimize impact |