avoid function pointer cast warning from GCC 3.4

This commit is contained in:
Joel Dice 2009-08-03 10:56:43 -06:00
parent 08dd7d0a5a
commit c3a8ca505c

View File

@ -78,7 +78,9 @@ runOnLoadIfFound(Thread* t, System::Library* library)
{
void* p = library->resolve("JNI_OnLoad");
if (p) {
reinterpret_cast<jint (JNICALL *)(Machine*, void*)>(p)(t->m, 0);
jint (JNICALL * JNI_OnLoad)(Machine*, void*);
memcpy(&JNI_OnLoad, &p, sizeof(void*));
JNI_OnLoad(t->m, 0);
}
}