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:
parent
250ea7930e
commit
1ac635c712
@ -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 "";
|
||||
|
Loading…
Reference in New Issue
Block a user