Index: clang/tools/scan-build/libexec/ccc-analyzer =================================================================== --- clang/tools/scan-build/libexec/ccc-analyzer +++ clang/tools/scan-build/libexec/ccc-analyzer @@ -72,7 +72,7 @@ # If on OSX, use xcrun to determine the SDK root. my $UseXCRUN = 0; -if (`uname -a` =~ m/Darwin/) { +if (`uname -s` =~ m/Darwin/) { $DefaultCCompiler = 'clang'; $DefaultCXXCompiler = 'clang++'; # Older versions of OSX do not have xcrun to @@ -80,7 +80,7 @@ if (-x "/usr/bin/xcrun") { $UseXCRUN = 1; } -} elsif (`uname -a` =~ m/OpenBSD/) { +} elsif (`uname -s` =~ m/OpenBSD/) { $DefaultCCompiler = 'cc'; $DefaultCXXCompiler = 'c++'; } else {