diff options
author | Yue Gan <yueg@google.com> | 2016-05-13 14:37:16 +0000 |
---|---|---|
committer | Kristina Chodorow <kchodorow@google.com> | 2016-05-16 15:16:36 +0000 |
commit | 0c19d6223d73f23558a279d91db49fe09e6f36b4 (patch) | |
tree | 26f01e7ff44a53f09e15bc256dc87623a716b9f6 | |
parent | 1d19f3dc578d44efdefee5edf5d801a7f1524ee3 (diff) |
Uses long in portable_sysctlbyname instead of jlong. Fixes #1249. Fixes #1254.
--
MOS_MIGRATED_REVID=122257999
-rw-r--r-- | src/main/native/unix_jni.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/native/unix_jni.cc b/src/main/native/unix_jni.cc index 801710f072..019d5c3b62 100644 --- a/src/main/native/unix_jni.cc +++ b/src/main/native/unix_jni.cc @@ -862,11 +862,11 @@ extern "C" JNIEXPORT jlong JNICALL Java_com_google_devtools_build_lib_unix_NativePosixSystem_sysctlbynameGetLong( JNIEnv *env, jclass clazz, jstring name) { const char *name_chars = GetStringLatin1Chars(env, name); - jlong r; + long r; size_t len = sizeof(r); if (portable_sysctlbyname(name_chars, &r, &len) == -1) { ::PostSystemException(env, errno, "sysctlbyname", name_chars); } ReleaseStringLatin1Chars(name_chars); - return r; + return (jlong)r; } |