summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2021-05-26 13:49:39 +0800
committerHerbert Xu <herbert@gondor.apana.org.au>2021-06-04 11:35:44 +0800
commit6f6d1f2da03468c0e131fdcbdcfa9771ffca2614 (patch)
tree99d9c8ff03af8b3da68a397c202b984a3f22e377
parentde368ab886309d326a5984e565c7102cdf8b7858 (diff)
downloaddash-6f6d1f2da03468c0e131fdcbdcfa9771ffca2614.tar.gz
shell: Call CHECK_DECL on stat64
On macOS it is possible to find stat64 at link-time but not at compile-time. To make the build process more robust we should check for the header file as well as the library. Reported-by: Saagar Jha <saagar@saagarjha.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
-rw-r--r--configure.ac5
1 files changed, 3 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index 44f2f95..466df4c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -140,11 +140,12 @@ if test "$ac_cv_func_signal" != yes; then
fi
dnl Check for stat64 (dietlibc/klibc).
-AC_CHECK_FUNC(stat64,, [
+AC_CHECK_DECL(stat64, AC_CHECK_FUNC(stat64))
+if test "$ac_cv_func_stat64" != yes; then
AC_DEFINE(fstat64, fstat, [64-bit operations are the same as 32-bit])
AC_DEFINE(lstat64, lstat, [64-bit operations are the same as 32-bit])
AC_DEFINE(stat64, stat, [64-bit operations are the same as 32-bit])
-])
+fi
AC_CHECK_FUNC(glob64,, [
AC_DEFINE(glob64_t, glob_t, [64-bit operations are the same as 32-bit])