summaryrefslogtreecommitdiff
path: root/deps/v8/src/base
diff options
context:
space:
mode:
authorJulien Gilli <julien.gilli@joyent.com>2014-10-09 13:01:27 -0700
committerFedor Indutny <fedor@indutny.com>2014-10-10 00:53:56 +0400
commit011319e248fedd9a8cdf3af3e954054f4ce4153a (patch)
treebbefc73f48ed7515bb2d7e24ba1c8527ffac0db8 /deps/v8/src/base
parent25e8adefa34f530951e3a71f6f7d08e12e752830 (diff)
downloadnode-new-011319e248fedd9a8cdf3af3e954054f4ce4153a.tar.gz
build: fix build for SmartOS
This change in V8: https://code.google.com/p/v8/source/detail?r=22210 has introduced a method named OS::GetCurrentThreadId which fails to compile on OSes where a "gettid" syscall does not exist. This build issue has been fixed upstream by another change: https://code.google.com/p/v8/source/detail?r=23459. This commit integrates this fix. It's still not clear if this is good enough for the long term, see https://code.google.com/p/v8/issues/detail?id=3620 for more information. The other build issue was due to the fact that alloca.h is not included by other system includes on SmartOS, which is assumed by V8. PR-URL: https://github.com/joyent/node/pull/8534 Reviewed-By: Fedor Indutny <fedor@indutny.com>
Diffstat (limited to 'deps/v8/src/base')
-rw-r--r--deps/v8/src/base/platform/platform-posix.cc6
-rw-r--r--deps/v8/src/base/platform/platform.h1
2 files changed, 6 insertions, 1 deletions
diff --git a/deps/v8/src/base/platform/platform-posix.cc b/deps/v8/src/base/platform/platform-posix.cc
index 252d213755..bb004d207e 100644
--- a/deps/v8/src/base/platform/platform-posix.cc
+++ b/deps/v8/src/base/platform/platform-posix.cc
@@ -323,8 +323,12 @@ int OS::GetCurrentProcessId() {
int OS::GetCurrentThreadId() {
#if defined(ANDROID)
return static_cast<int>(syscall(__NR_gettid));
-#else
+#elif defined(SYS_gettid)
return static_cast<int>(syscall(SYS_gettid));
+#else
+ // PNaCL doesn't have a way to get an integral thread ID, but it doesn't
+ // really matter, because we only need it in PerfJitLogger::LogRecordedBuffer.
+ return 0;
#endif // defined(ANDROID)
}
diff --git a/deps/v8/src/base/platform/platform.h b/deps/v8/src/base/platform/platform.h
index 8a54126268..9567572d80 100644
--- a/deps/v8/src/base/platform/platform.h
+++ b/deps/v8/src/base/platform/platform.h
@@ -35,6 +35,7 @@ namespace std {
int signbit(double x);
}
# endif
+#include <alloca.h>
#endif
#if V8_OS_QNX