summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lldb/source/Host/netbsd/HostInfoNetBSD.cpp3
-rw-r--r--lldb/source/Plugins/Platform/Windows/PlatformWindows.cpp12
2 files changed, 4 insertions, 11 deletions
diff --git a/lldb/source/Host/netbsd/HostInfoNetBSD.cpp b/lldb/source/Host/netbsd/HostInfoNetBSD.cpp
index 19afae3f698..ff0cec707b7 100644
--- a/lldb/source/Host/netbsd/HostInfoNetBSD.cpp
+++ b/lldb/source/Host/netbsd/HostInfoNetBSD.cpp
@@ -26,9 +26,10 @@ llvm::VersionTuple HostInfoNetBSD::GetOSVersion() {
::memset(&un, 0, sizeof(un));
if (::uname(&un) < 0)
- return false;
+ return VersionTuple();
/* Accept versions like 7.99.21 and 6.1_STABLE */
+ uint32_t major, minor, update;
int status = ::sscanf(un.release, "%" PRIu32 ".%" PRIu32 ".%" PRIu32, &major,
&minor, &update);
switch (status) {
diff --git a/lldb/source/Plugins/Platform/Windows/PlatformWindows.cpp b/lldb/source/Plugins/Platform/Windows/PlatformWindows.cpp
index c752d645c55..ed2bcf0cbee 100644
--- a/lldb/source/Plugins/Platform/Windows/PlatformWindows.cpp
+++ b/lldb/source/Plugins/Platform/Windows/PlatformWindows.cpp
@@ -568,16 +568,8 @@ void PlatformWindows::GetStatus(Stream &strm) {
Platform::GetStatus(strm);
#ifdef _WIN32
- uint32_t major;
- uint32_t minor;
- uint32_t update;
- if (!HostInfo::GetOSVersion(major, minor, update)) {
- strm << "Windows";
- return;
- }
-
- strm << "Host: Windows " << major << '.' << minor << " Build: " << update
- << '\n';
+ llvm::VersionTuple version = HostInfo::GetOSVersion();
+ strm << "Host: Windows " << version.getAsString() << '\n';
#endif
}
OpenPOWER on IntegriCloud