diff options
Diffstat (limited to 'lib/Support/Unix/Host.inc')
-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 0f3e31a41b..744fb9e699 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 ""; |