Handle a /etc/debian_version with a version number instead of a codename.

Patch by Sylvestre Ledru. Fixes PR11673.

llvm-svn: 147313
This commit is contained in:
Rafael Espindola 2011-12-28 18:17:14 +00:00
parent e46f096a16
commit 1510c8589e
1 changed files with 2 additions and 2 deletions

View File

@ -1817,9 +1817,9 @@ static LinuxDistro DetectLinuxDistro(llvm::Triple::ArchType Arch) {
StringRef Data = File.get()->getBuffer();
if (Data[0] == '5')
return DebianLenny;
else if (Data.startswith("squeeze/sid"))
else if (Data.startswith("squeeze/sid") || Data[0] == '6')
return DebianSqueeze;
else if (Data.startswith("wheezy/sid"))
else if (Data.startswith("wheezy/sid") || Data[0] == '7')
return DebianWheezy;
return UnknownDistro;
}