diff options
-rw-r--r-- | base/platform_thread_posix.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/base/platform_thread_posix.cc b/base/platform_thread_posix.cc index 040452e..66f3928 100644 --- a/base/platform_thread_posix.cc +++ b/base/platform_thread_posix.cc @@ -4,7 +4,6 @@ #include "base/platform_thread.h" -#include <dlfcn.h> #include <errno.h> #include <sched.h> @@ -15,11 +14,16 @@ #endif #if defined(OS_LINUX) +#include <dlfcn.h> #include <sys/prctl.h> #include <sys/syscall.h> #include <unistd.h> #endif +#if defined(OS_NACL) +#include <sys/nacl_syscalls.h> +#endif + #include "base/logging.h" #include "base/safe_strerror_posix.h" @@ -47,6 +51,8 @@ PlatformThreadId PlatformThread::CurrentId() { #elif defined(OS_FREEBSD) // TODO(BSD): find a better thread ID return reinterpret_cast<int64>(pthread_self()); +#elif defined(OS_NACL) + return pthread_self(); #endif } |