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.
# 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