summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Platform/Linux/PlatformLinux.cpp
diff options
context:
space:
mode:
authorVirgile Bello <virgile.bello@gmail.com>2013-08-23 12:44:05 +0000
committerVirgile Bello <virgile.bello@gmail.com>2013-08-23 12:44:05 +0000
commitb2f1fb2943c5e6833dcd2e1166b83ae4aca06d7a (patch)
tree2cf9567a828318ccccd4df22f7af31b4e796e5ec /lldb/source/Plugins/Platform/Linux/PlatformLinux.cpp
parentfcfa0afd7a09133d00bdc047cf894fce005a287a (diff)
downloadbcm5719-llvm-b2f1fb2943c5e6833dcd2e1166b83ae4aca06d7a.tar.gz
bcm5719-llvm-b2f1fb2943c5e6833dcd2e1166b83ae4aca06d7a.zip
MingW compilation (windows). Includes various refactoring to improve portability.
llvm-svn: 189107
Diffstat (limited to 'lldb/source/Plugins/Platform/Linux/PlatformLinux.cpp')
-rw-r--r--lldb/source/Plugins/Platform/Linux/PlatformLinux.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/lldb/source/Plugins/Platform/Linux/PlatformLinux.cpp b/lldb/source/Plugins/Platform/Linux/PlatformLinux.cpp
index 4bf4cf8bc44..1456a7cf714 100644
--- a/lldb/source/Plugins/Platform/Linux/PlatformLinux.cpp
+++ b/lldb/source/Plugins/Platform/Linux/PlatformLinux.cpp
@@ -10,10 +10,13 @@
#include "lldb/lldb-python.h"
#include "PlatformLinux.h"
+#include "lldb/Host/Config.h"
// C Includes
#include <stdio.h>
+#ifndef LLDB_DISABLE_POSIX
#include <sys/utsname.h>
+#endif
// C++ Includes
// Other libraries and framework includes
@@ -357,16 +360,18 @@ PlatformLinux::GetSupportedArchitectureAtIndex (uint32_t idx, ArchSpec &arch)
void
PlatformLinux::GetStatus (Stream &strm)
{
- struct utsname un;
-
Platform::GetStatus(strm);
+#ifndef LLDB_DISABLE_POSIX
+ struct utsname un;
+
if (uname(&un))
return;
strm.Printf (" Kernel: %s\n", un.sysname);
strm.Printf (" Release: %s\n", un.release);
strm.Printf (" Version: %s\n", un.version);
+#endif
}
size_t
OpenPOWER on IntegriCloud