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:
Ed Maste 2013-06-25 20:50:07 +00:00
parent ef87be3a62
commit 2f0d590713
1 changed files with 3 additions and 2 deletions

View File

@ -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