projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c6fbe56
)
Put Darwin-specific code inside an __APPLE__ ifdef.
author
Bob Wilson
<bob.wilson@apple.com>
Tue, 9 Aug 2011 19:54:32 +0000
(19:54 +0000)
committer
Bob Wilson
<bob.wilson@apple.com>
Tue, 9 Aug 2011 19:54:32 +0000
(19:54 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137137
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Support/Unix/Host.inc
patch
|
blob
|
history
diff --git
a/lib/Support/Unix/Host.inc
b/lib/Support/Unix/Host.inc
index 0f3e31a41b92acd3b5f0e5496fbfad07c532b21d..744fb9e699699a53b67aebb4a0b0c467ce1b97e7 100644
(file)
--- 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 "";