summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorPo Lu <luangruo@yahoo.com>2025-11-05 11:10:11 +0800
committerPo Lu <luangruo@yahoo.com>2025-11-05 11:10:11 +0800
commite54fd7c012c9fb3bbccf64a128fb81a411c4310f (patch)
tree42dcbaf2f46fb87f0987eaac20b77396e8b1ff83 /configure.ac
parent240355949e3d7b5ca944b057f6c21020b9ba5254 (diff)
Fix compilation on Android SDK 20 and earlier
* configure.ac (gl_PREREQ_NPROC): Disable ac_cv_header_mntent_h if on Android and setmntent is not declared.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac6
1 files changed, 6 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 44d9cae1e7e..ccc8719c091 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1599,6 +1599,12 @@ AC_DEFUN([gl_CRYPTO_CHECK])
# Avoid gnulib's tests for HAVE_WORKING_O_NOATIME and HAVE_WORKING_O_NOFOLLOW,
# as we don't use them.
AC_DEFUN([gl_FCNTL_O_FLAGS])
+# Disable nproc.c's usage of mntent.h if setmntent is undefined, as on
+# Android SDK <= 20.
+AC_DEFUN([gl_PREREQ_NPROC],
+ [AS_IF([test "$opsys" = "android"],
+ [AC_CHECK_DECL([setmntent], [], [ac_cv_header_mntent_h=no],
+ [[#include <mntent.h>]])])]m4_defn([gl_PREREQ_NPROC]))
# Avoid gnulib's test for pthread_sigmask.
funcs=
for func in $ac_func_list; do