diff --git a/src/classpath-openjdk.cpp b/src/classpath-openjdk.cpp index 46fbd7e326..13f58186ee 100644 --- a/src/classpath-openjdk.cpp +++ b/src/classpath-openjdk.cpp @@ -2115,6 +2115,16 @@ Avian_sun_misc_Unsafe_putObject set(t, o, offset, reinterpret_cast(value)); } +extern "C" JNIEXPORT int64_t JNICALL +Avian_sun_misc_Unsafe_getShort__Ljava_lang_Object_2J +(Thread*, object, uintptr_t* arguments) +{ + object o = reinterpret_cast(arguments[1]); + int64_t offset; memcpy(&offset, arguments + 2, 8); + + return cast(o, offset); +} + extern "C" JNIEXPORT int64_t JNICALL Avian_sun_misc_Unsafe_getInt__Ljava_lang_Object_2J (Thread*, object, uintptr_t* arguments) @@ -2711,7 +2721,10 @@ EXPORT(JVM_GC)() } extern "C" JNIEXPORT jlong JNICALL -EXPORT(JVM_MaxObjectInspectionAge)(void) { abort(); } +EXPORT(JVM_MaxObjectInspectionAge)(void) +{ + return 0; +} extern "C" JNIEXPORT void JNICALL EXPORT(JVM_TraceInstructions)(jboolean) { abort(); }