From: Chris Lattner Date: Mon, 14 Feb 2005 21:42:10 +0000 (+0000) Subject: Fix a bug in my previous change to this, which broke the build on sparcs. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=0798056b286051fd0f9e8704179ebb4f577cadd5;p=oota-llvm.git Fix a bug in my previous change to this, which broke the build on sparcs. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20184 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/System/Unix/Unix.h b/lib/System/Unix/Unix.h index 75009d0746e..2f57b68c8eb 100644 --- a/lib/System/Unix/Unix.h +++ b/lib/System/Unix/Unix.h @@ -77,7 +77,7 @@ inline void ThrowErrno(const std::string& prefix) { // Copy the thread un-safe result of strerror into // the buffer as fast as possible to minimize impact // of collision of strerror in multiple threads. - if (Errno) + if (errno) strncpy(buffer,strerror(errno),MAXPATHLEN-1); buffer[MAXPATHLEN-1] = 0; #else