Index: src/base/platform/semaphore.cc |
diff --git a/src/base/platform/semaphore.cc b/src/base/platform/semaphore.cc |
index e11338fd55a4a37698ab56a91592534a7d5a0fe6..4b41a57476fcbf9429bb52110117394b9867b380 100644 |
--- a/src/base/platform/semaphore.cc |
+++ b/src/base/platform/semaphore.cc |
@@ -112,7 +112,12 @@ bool Semaphore::WaitFor(const TimeDelta& rel_time) { |
// Wait for semaphore signalled or timeout. |
while (true) { |
+#if V8_OS_NACL |
+ int result = sem_wait(&native_handle_); |
+ USE(ts); |
+#else |
int result = sem_timedwait(&native_handle_, &ts); |
+#endif |
if (result == 0) return true; // Semaphore was signalled. |
#if V8_LIBC_GLIBC && !V8_GLIBC_PREREQ(2, 4) |
if (result > 0) { |