mirror of
https://github.com/intel/llvm.git
synced 2026-02-04 03:26:06 +08:00
Fix OS Version reporting bug detected by TestPlatform for some Linux 3.x kernels that do not report the update version
- should resolve the current failure on the Linux clang buildbot llvm-svn: 191568
This commit is contained in:
@@ -213,7 +213,14 @@ Host::GetOSVersion(uint32_t &major,
|
||||
return false;
|
||||
|
||||
status = sscanf(un.release, "%u.%u.%u", &major, &minor, &update);
|
||||
return status == 3;
|
||||
if (status == 3)
|
||||
return true;
|
||||
|
||||
// Some kernels omit the update version, so try looking for just "X.Y" and
|
||||
// set update to 0.
|
||||
update = 0;
|
||||
status = sscanf(un.release, "%u.%u", &major, &minor);
|
||||
return status == 2;
|
||||
}
|
||||
|
||||
lldb::DataBufferSP
|
||||
|
||||
Reference in New Issue
Block a user