aboutsummaryrefslogtreecommitdiff
path: root/lib/Support/Unix/Host.inc
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Support/Unix/Host.inc')
-rw-r--r--lib/Support/Unix/Host.inc6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/Support/Unix/Host.inc b/lib/Support/Unix/Host.inc
index 726e2fbcf0..aa06763258 100644
--- a/lib/Support/Unix/Host.inc
+++ b/lib/Support/Unix/Host.inc
@@ -19,7 +19,9 @@
#include "llvm/Config/config.h"
#include "llvm/ADT/StringRef.h"
#include "Unix.h"
+#if !defined(__native_client__)
#include <sys/utsname.h>
+#endif // (__native_client__)
#include <cctype>
#include <string>
#include <cstdlib> // ::getenv
@@ -27,12 +29,16 @@
using namespace llvm;
static std::string getOSVersion() {
+#if !defined(__native_client__)
struct utsname info;
if (uname(&info))
return "";
return info.release;
+#else // (__native_client__)
+ return "";
+#endif // (__native_client__)
}
std::string sys::getDefaultTargetTriple() {