Merge pull request #9753 from EduardoRFS/trunk-android

Fix build for Android
master
Xavier Leroy 2020-07-22 15:06:23 +02:00 committed by GitHub
commit 6f2ee088ba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 30 additions and 9 deletions

26
configure vendored
View File

@ -12998,13 +12998,6 @@ if test "x$ac_cv_header_stdint_h" = xyes; then :
fi
ac_fn_c_check_header_mongrel "$LINENO" "sys/shm.h" "ac_cv_header_sys_shm_h" "$ac_includes_default"
if test "x$ac_cv_header_sys_shm_h" = xyes; then :
$as_echo "#define HAS_SYS_SHM_H 1" >>confdefs.h
fi
ac_fn_c_check_header_compile "$LINENO" "dirent.h" "ac_cv_header_dirent_h" "#include <sys/types.h>
"
if test "x$ac_cv_header_dirent_h" = xyes; then :
@ -15604,6 +15597,23 @@ if test "x$ac_cv_func_getauxval" = xyes; then :
fi
## shmat
ac_fn_c_check_header_mongrel "$LINENO" "sys/shm.h" "ac_cv_header_sys_shm_h" "$ac_includes_default"
if test "x$ac_cv_header_sys_shm_h" = xyes; then :
$as_echo "#define HAS_SYS_SHM_H 1" >>confdefs.h
ac_fn_c_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
if test "x$ac_cv_func_shmat" = xyes; then :
$as_echo "#define HAS_SHMAT 1" >>confdefs.h
fi
fi
## execvpe
ac_fn_c_check_func "$LINENO" "execvpe" "ac_cv_func_execvpe"
@ -16338,6 +16348,8 @@ if test "x$ax_pthread_ok" = "xyes"; then
pthread_link="-lpthread -lposix4" ;; #(
*-*-haiku*) :
pthread_link="" ;; #(
*-*-android*) :
pthread_link="" ;; #(
*) :
pthread_link="-lpthread" ;;
esac

View File

@ -740,7 +740,6 @@ AS_IF([test "x$ac_cv_lib_m_cos" = xyes ], [mathlib="-lm"], [mathlib=""])
AC_CHECK_HEADER([math.h])
AC_CHECK_HEADERS([unistd.h],[AC_DEFINE([HAS_UNISTD])])
AC_CHECK_HEADER([stdint.h],[AC_DEFINE([HAS_STDINT_H])])
AC_CHECK_HEADER([sys/shm.h],[AC_DEFINE([HAS_SYS_SHM_H])])
AC_CHECK_HEADER([dirent.h], [AC_DEFINE([HAS_DIRENT])], [],
[#include <sys/types.h>])
@ -1564,6 +1563,13 @@ AC_CHECK_FUNC([accept4], [AC_DEFINE([HAS_ACCEPT4])])
AC_CHECK_FUNC([getauxval], [AC_DEFINE([HAS_GETAUXVAL])])
## shmat
AC_CHECK_HEADER([sys/shm.h],
[
AC_DEFINE([HAS_SYS_SHM_H])
AC_CHECK_FUNC([shmat], [AC_DEFINE([HAS_SHMAT])])
])
## execvpe
AC_CHECK_FUNC([execvpe], [AC_DEFINE([HAS_EXECVPE])])
@ -1624,6 +1630,7 @@ AS_IF([test x"$enable_systhreads" = "xno"],
AS_CASE([$host],
[*-*-solaris*], [pthread_link="-lpthread -lposix4"],
[*-*-haiku*], [pthread_link=""],
[*-*-android*], [pthread_link=""],
[pthread_link="-lpthread"])
common_cppflags="$common_cppflags -D_REENTRANT"
AC_MSG_NOTICE([the POSIX threads library is supported])

View File

@ -15,7 +15,7 @@
/* Runtime support for afl-fuzz */
#include "caml/config.h"
#if !defined(HAS_SYS_SHM_H)
#if !defined(HAS_SYS_SHM_H) || !defined(HAS_SHMAT)
#include "caml/mlvalues.h"

View File

@ -245,6 +245,8 @@
#undef HAS_SYS_SHM_H
#undef HAS_SHMAT
#undef HAS_EXECVPE
#undef HAS_POSIX_SPAWN