From 7ca80709e2a81854da774c8e90f5a5125ba863ef Mon Sep 17 00:00:00 2001 From: Ivan Maidanski Date: Sat, 18 Sep 2021 12:35:32 +0300 Subject: Turn on automatic fork() handling by default on Android Note: pthread_atfork() is available in Android NDK since API level 21. * CMakeLists.txt [CMAKE_USE_PTHREADS_INIT && !MSYS && !APPLE && $enable_handle_fork && !$disable_handle_fork] (HANDLE_FORK): Define macro (even for Android). * configure.ac [$enable_handle_fork!=yes && $enable_handle_fork!=no && $enable_handle_fork!=manual && $THREADS==xposix && $host==*-*-android*] (HANDLE_FORK): Define AC macro. --- configure.ac | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 05c26f64..d28d6073 100644 --- a/configure.ac +++ b/configure.ac @@ -1165,13 +1165,10 @@ elif test "${enable_handle_fork}" != manual -a x$THREADS = xposix; then # If the option is omitted, pthread_atfork handlers are installed # by default for the targets where pthread_atfork is known to work. case "$host" in - *-*-android*) - # Android NDK does not provide pthread_atfork. - ;; *-*-darwin*) # The incremental mode conflicts with fork handling on Darwin. ;; - *-*-aix* | *-*-cygwin* | *-*-freebsd* | *-*-haiku* | \ + *-*-aix* | *-*-android* | *-*-cygwin* | *-*-freebsd* | *-*-haiku* | \ *-*-hpux11* | *-*-irix* | *-*-kfreebsd*-gnu | \ *-*-*linux* | *-*-netbsd* | *-*-openbsd* | *-*-osf* | *-*-solaris*) AC_DEFINE(HANDLE_FORK) -- cgit v1.2.1