From: Ivan Maidanski Date: Wed, 9 Sep 2015 08:42:43 +0000 (+0300) Subject: Support Android API level 21 X-Git-Tag: gc7_4_4~78 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=697be5db384445543bb487944934028cbbf14fcf;p=gc Support Android API level 21 (fix 'link_map redefinition' error on Android with API level 21+) * dyn_load.c (link_map, r_debug): Do not define if android-21 (or higher) API is used; update comment. --- diff --git a/dyn_load.c b/dyn_load.c index 3b907185..326bd2de 100644 --- a/dyn_load.c +++ b/dyn_load.c @@ -109,9 +109,9 @@ STATIC GC_has_static_roots_func GC_has_static_roots = 0; # undef EM_ALPHA # endif # include -# if !defined(GC_DONT_DEFINE_LINK_MAP) - /* link_map and r_debug should be defined explicitly, */ - /* as only bionic/linker/linker.h defines them but the header */ +# if !defined(GC_DONT_DEFINE_LINK_MAP) && !(__ANDROID_API__ >= 21) + /* link_map and r_debug are defined in link.h of NDK r10+. */ + /* bionic/linker/linker.h defines them too but the header */ /* itself is a C++ one starting from Android 4.3. */ struct link_map { uintptr_t l_addr;