forked from OSchip/llvm-project
Update version sscanf to match FreeBSD release info
Release strings are of the form 9.1-RELEASE-p3 or 10.0-CURRENT. llvm-svn: 184876
This commit is contained in:
parent
ef87be3a62
commit
2f0d590713
|
@ -131,8 +131,9 @@ Host::GetOSVersion(uint32_t &major,
|
|||
if (uname(&un) < 0)
|
||||
return false;
|
||||
|
||||
status = sscanf(un.release, "%u.%u-%u", &major, &minor, &update);
|
||||
return status == 3;
|
||||
status = sscanf(un.release, "%u.%u", &major, &minor);
|
||||
update = UINT32_MAX;
|
||||
return status == 2;
|
||||
}
|
||||
|
||||
Error
|
||||
|
|
Loading…
Reference in New Issue