forked from OSchip/llvm-project
Fix netbsd build broken by r334950
This also includes one more build fix for windows. llvm-svn: 334953
This commit is contained in:
parent
9d4758ecdd
commit
76ba497177
|
@ -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) {
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue