From 2f0d590713071a6c1d612840196534c6fb8b1753 Mon Sep 17 00:00:00 2001 From: Ed Maste Date: Tue, 25 Jun 2013 20:50:07 +0000 Subject: [PATCH] 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 --- lldb/source/Host/freebsd/Host.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lldb/source/Host/freebsd/Host.cpp b/lldb/source/Host/freebsd/Host.cpp index 7be15e13e8aa..b585d62b5318 100644 --- a/lldb/source/Host/freebsd/Host.cpp +++ b/lldb/source/Host/freebsd/Host.cpp @@ -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