1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 19:52:54 +01:00

Put Darwin-specific code inside an __APPLE__ ifdef.

llvm-svn: 137137
This commit is contained in:
Bob Wilson 2011-08-09 19:54:32 +00:00
parent 250ea7930e
commit 1ac635c712

View File

@ -29,10 +29,12 @@ using namespace llvm;
static std::string getOSVersion() {
struct utsname info;
#ifdef __APPLE__
// Recognize UNAME_RELEASE environment variable to match Darwin uname.
const char *UnameOverride = ::getenv("UNAME_RELEASE");
if (UnameOverride && UnameOverride[0] != '\0')
return UnameOverride;
#endif // __APPLE__
if (uname(&info))
return "";