Browse Source

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>
archived-io.js-v0.12
Julien Gilli 10 years ago
committed by Fedor Indutny
parent
commit
011319e248
  1. 6
      deps/v8/src/base/platform/platform-posix.cc
  2. 1
      deps/v8/src/base/platform/platform.h

6
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)
}

1
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

Loading…
Cancel
Save