diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2010-06-10 23:45:58 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2010-06-10 23:45:58 +0000 |
commit | 6eb685c264c26b4152048182925cb1cdff91e081 (patch) | |
tree | 8b85fd9ede96cf8dc02442e798ed8720a34b5e0d /lldb/source/Core/Error.cpp | |
parent | a92e332b09bc3b67ddac94ab5e40e74932c84d29 (diff) | |
download | bcm5719-llvm-6eb685c264c26b4152048182925cb1cdff91e081.tar.gz bcm5719-llvm-6eb685c264c26b4152048182925cb1cdff91e081.zip |
Make Error.h and Error.cpp compile on Linux.
llvm-svn: 105798
Diffstat (limited to 'lldb/source/Core/Error.cpp')
-rw-r--r-- | lldb/source/Core/Error.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lldb/source/Core/Error.cpp b/lldb/source/Core/Error.cpp index c3522093f9b..24ab2fc6f98 100644 --- a/lldb/source/Core/Error.cpp +++ b/lldb/source/Core/Error.cpp @@ -15,6 +15,9 @@ // Project includes #include "lldb/Core/Error.h" #include "lldb/Core/Log.h" +#include <cstdarg> +#include <cstdlib> +#include <cstring> #if defined (__arm__) #include <SpringBoardServices/SpringBoardServer.h> @@ -52,7 +55,7 @@ Error::operator = (const Error& rhs) // Assignment operator //---------------------------------------------------------------------- const Error& -Error::operator = (kern_return_t err) +Error::operator = (uint32_t err) { m_code = err; m_type = eErrorTypeMachKernel; @@ -81,7 +84,9 @@ Error::AsCString(const char *default_error_str) const switch (m_type) { case eErrorTypeMachKernel: +#ifdef __APPLE__ s = ::mach_error_string (m_code); +#endif break; case eErrorTypePOSIX: @@ -223,7 +228,7 @@ Error::LogIfError (Log *log, const char *format, ...) // "eErrorTypeMachKernel" //---------------------------------------------------------------------- void -Error::SetError (kern_return_t err) +Error::SetError (uint32_t err) { m_code = err; m_type = eErrorTypeMachKernel; |