From a441d305f47bc78fd4116a5bacefb866caab6558 Mon Sep 17 00:00:00 2001 From: Ivan Maidanski Date: Thu, 20 Jul 2017 12:11:22 +0300 Subject: [PATCH] Do not use tkill (Android) tkill() has been deprecated in Android. Starting from NDK r11 (which introduced android-23 API), the call exists only in libc.a (but not in libc.so). The comment in Bionic says that tkill exists only for Mono clients (and only for 32-bit targets). * include/private/gcconfig.h [PLATFORM_ANDROID && CPP_WORDSZ==32] (USE_TKILL_ON_ANDROID): Do not define if __ANDROID_API__ >= 23; add comment. --- include/private/gcconfig.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/include/private/gcconfig.h b/include/private/gcconfig.h index 886ab9c0..39bc96a4 100644 --- a/include/private/gcconfig.h +++ b/include/private/gcconfig.h @@ -2718,9 +2718,11 @@ # define GETPAGESIZE() (unsigned)getpagesize() #endif -#if defined(PLATFORM_ANDROID) && ((defined(MIPS) && (CPP_WORDSZ == 32)) \ - || defined(ARM32) || defined(I386) /* but not x32 */) +#if defined(PLATFORM_ANDROID) && !(__ANDROID_API__ >= 23) \ + && ((defined(MIPS) && (CPP_WORDSZ == 32)) \ + || defined(ARM32) || defined(I386) /* but not x32 */) /* tkill() exists only on arm32/mips(32)/x86. */ + /* NDK r11+ deprecates tkill() but keeps it for Mono clients. */ # define USE_TKILL_ON_ANDROID #endif -- 2.40.0