Make jni_helpers build on arm32.

BUG=None

Review URL: https://codereview.webrtc.org/1311753002

Cr-Commit-Position: refs/heads/master@{#9806}
This commit is contained in:
phoglund
2015-08-28 02:58:41 -07:00
committed by Commit bot
parent 6ec1f921b1
commit 6480d03f17

View File

@ -103,7 +103,8 @@ jint InitGlobalJniVariables(JavaVM *jvm) {
// Return thread ID as a string.
static std::string GetThreadId() {
char buf[21]; // Big enough to hold a kuint64max plus terminating NULL.
CHECK_LT(snprintf(buf, sizeof(buf), "%ld", syscall(__NR_gettid)),
CHECK_LT(snprintf(buf, sizeof(buf), "%ld",
static_cast<long>(syscall(__NR_gettid))),
sizeof(buf))
<< "Thread id is bigger than uint64??";
return std::string(buf);