From 6e209e292503c896cf4054468912632a42b1ccf8 Mon Sep 17 00:00:00 2001 From: Joel Dice Date: Tue, 2 Sep 2014 10:14:04 -0600 Subject: [PATCH] a couple of tweaks to get Mac/Android tests passing --- makefile | 5 +++-- src/classpath-android.cpp | 9 +++++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/makefile b/makefile index 4e3a5c5884..6c9cc74476 100755 --- a/makefile +++ b/makefile @@ -236,10 +236,10 @@ ifneq ($(android),) -DJNI_JARJAR_PREFIX= \ -D__DARWIN_UNIX03=1 \ -D__PROVIDE_FIXMES \ - -DHAVE_OFF64_T \ -DSTATIC_LIB \ -g3 \ - -Werror + -Werror \ + -Wno-shift-count-overflow luni-cpps := $(shell find $(luni-native) -name '*.cpp') @@ -285,6 +285,7 @@ ifneq ($(android),) -lstdc++ ifeq ($(platform),linux) + android-cflags += -DHAVE_OFF64_T classpath-lflags += -lrt endif diff --git a/src/classpath-android.cpp b/src/classpath-android.cpp index 69d5ab81cf..37e3abf04b 100644 --- a/src/classpath-android.cpp +++ b/src/classpath-android.cpp @@ -254,13 +254,14 @@ class MyClasspath : public Classpath { { // force monitor creation so we don't get an OutOfMemory error // later when we try to acquire it: - objectMonitor(t, t->javaThread, true); + objectMonitor(t, t->javaThread->lock(), true); THREAD_RESOURCE0(t, { - vm::acquire(t, t->javaThread); + vm::acquire(t, t->javaThread->lock()); t->clearFlag(Thread::ActiveFlag); - vm::notifyAll(t, t->javaThread); - vm::release(t, t->javaThread); + t->javaThread->peer() = 0; + vm::notifyAll(t, t->javaThread->lock()); + vm::release(t, t->javaThread->lock()); }); GcMethod* method = resolveMethod(