From 617c8075aca140a09a57a3d9da4fdc80a64998c5 Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Fri, 13 Jan 2012 12:30:46 +0200 Subject: [PATCH] Use cacheflush() on Android --- bridges/source/cpp_uno/gcc3_linux_arm/cpp2uno.cxx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/bridges/source/cpp_uno/gcc3_linux_arm/cpp2uno.cxx b/bridges/source/cpp_uno/gcc3_linux_arm/cpp2uno.cxx index 9869bb5c9557..91b96cd02a3b 100644 --- a/bridges/source/cpp_uno/gcc3_linux_arm/cpp2uno.cxx +++ b/bridges/source/cpp_uno/gcc3_linux_arm/cpp2uno.cxx @@ -46,6 +46,9 @@ #include +#ifdef ANDROID +#include +#endif using namespace ::osl; using namespace ::rtl; @@ -551,10 +554,14 @@ unsigned char * bridges::cpp_uno::shared::VtableFactory::addLocalFunctions( void bridges::cpp_uno::shared::VtableFactory::flushCode( unsigned char const *beg, unsigned char const *end) { +#ifndef ANDROID static void (*clear_cache)(unsigned char const*, unsigned char const*) = (void (*)(unsigned char const*, unsigned char const*)) dlsym(RTLD_DEFAULT, "__clear_cache"); (*clear_cache)(beg, end); +#else + cacheflush((long) beg, (long) end, 0); +#endif } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */