diff options
author | Bob Wilson <bob.wilson@apple.com> | 2011-08-09 19:54:32 +0000 |
---|---|---|
committer | Bob Wilson <bob.wilson@apple.com> | 2011-08-09 19:54:32 +0000 |
commit | 0dc8b42987d091fafe9fc53f0159db8d0ecced4d (patch) | |
tree | 2b0ed75b22b2b7a1f024656f4d0cbb3748027c64 /lib | |
parent | c6fbe5636da8906de295c3c5f36ab44fb768ae34 (diff) |
Put Darwin-specific code inside an __APPLE__ ifdef.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137137 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Support/Unix/Host.inc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Support/Unix/Host.inc b/lib/Support/Unix/Host.inc index 0f3e31a41b9..744fb9e6996 100644 --- a/lib/Support/Unix/Host.inc +++ b/lib/Support/Unix/Host.inc @@ -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 ""; |