summaryrefslogtreecommitdiff
path: root/jvmaccess/source
diff options
context:
space:
mode:
authorTor Lillqvist <tlillqvist@suse.com>2011-11-25 01:01:10 +0200
committerTor Lillqvist <tlillqvist@suse.com>2011-11-25 01:01:10 +0200
commitb1b915c809b86df6cde84ecff091036901f6de14 (patch)
tree320c43b5da4667efda7d1c54cc60166c4149dced /jvmaccess/source
parent9ee4f4eb52b0c03a2902acc081c847c4514fea35 (diff)
Android compilation fix
Diffstat (limited to 'jvmaccess/source')
-rw-r--r--jvmaccess/source/virtualmachine.cxx11
1 files changed, 10 insertions, 1 deletions
diff --git a/jvmaccess/source/virtualmachine.cxx b/jvmaccess/source/virtualmachine.cxx
index da7aa3843188..3e1208808866 100644
--- a/jvmaccess/source/virtualmachine.cxx
+++ b/jvmaccess/source/virtualmachine.cxx
@@ -105,7 +105,16 @@ JNIEnv * VirtualMachine::attachThread(bool * pAttached) const
}
if (pEnv == 0)
{
- if (m_pVm->AttachCurrentThread(reinterpret_cast< void ** >(&pEnv), 0)
+ if (m_pVm->AttachCurrentThread
+ (
+#ifndef ANDROID
+ reinterpret_cast< void ** >(&pEnv),
+#else
+ // The Android <jni.h> has AttachCurrentThread() taking a
+ // JNIEnv** and not void **
+ &pEnv,
+#endif
+ 0)
!= JNI_OK)
return 0;
*pAttached = true;