aboutsummaryrefslogtreecommitdiff
path: root/lib/Support/Unix/Watchdog.inc
diff options
context:
space:
mode:
authorEli Bendersky <eliben@chromium.org>2013-07-18 17:39:24 -0700
committerEli Bendersky <eliben@chromium.org>2013-07-18 17:39:24 -0700
commit4a9f2a703db400ccf760f34101bcdd57642f96e4 (patch)
treef524d70ee6f2cf990c30f157e2f6f7c7a71816ed /lib/Support/Unix/Watchdog.inc
parent2f90dcad71d5a9ebc3ea2b7287eeb7731f9044b7 (diff)
Some more OS-specific calls were added that are not supported in the
sandboxed build. Condition them properly on __native_client__.
Diffstat (limited to 'lib/Support/Unix/Watchdog.inc')
-rw-r--r--lib/Support/Unix/Watchdog.inc4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Support/Unix/Watchdog.inc b/lib/Support/Unix/Watchdog.inc
index 5d89c0e51b..9133d01183 100644
--- a/lib/Support/Unix/Watchdog.inc
+++ b/lib/Support/Unix/Watchdog.inc
@@ -19,13 +19,17 @@ namespace llvm {
namespace sys {
Watchdog::Watchdog(unsigned int seconds) {
#ifdef HAVE_UNISTD_H
+ #ifndef __native_client__
alarm(seconds);
+ #endif // __native_client__
#endif
}
Watchdog::~Watchdog() {
#ifdef HAVE_UNISTD_H
+ #ifndef __native_client__
alarm(0);
+ #endif //__native_client__
#endif
}
}