Commit 0fd5a733 authored by Joshua Root's avatar Joshua Root Committed by Benjamin Peterson

bpo-34652: Use AC_CHECK_FUNCS for lchmod. (GH-12799)

A fix for 69e96910, which resulted in lchmod being disabled on all platforms, not just Linux.

(cherry picked from commit ed709d56)
parent 22de4ce4
......@@ -10632,10 +10632,16 @@ done
# links. Some libc implementations have a stub lchmod implementation that always
# returns an error.
if test "$MACHDEP" != linux; then
for ac_func in lchmod
do :
ac_fn_c_check_func "$LINENO" "lchmod" "ac_cv_func_lchmod"
if test "x$ac_cv_func_lchmod" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_LCHMOD 1
_ACEOF
fi
done
fi
......
......@@ -3138,7 +3138,7 @@ AC_CHECK_FUNCS(alarm setitimer getitimer bind_textdomain_codeset chown \
# links. Some libc implementations have a stub lchmod implementation that always
# returns an error.
if test "$MACHDEP" != linux; then
AC_CHECK_FUNC(lchmod)
AC_CHECK_FUNCS(lchmod)
fi
# For some functions, having a definition is not sufficient, since
......
......@@ -439,6 +439,9 @@
/* Define to 1 if you have the 'lchflags' function. */
#undef HAVE_LCHFLAGS
/* Define to 1 if you have the `lchmod' function. */
#undef HAVE_LCHMOD
/* Define to 1 if you have the `lchown' function. */
#undef HAVE_LCHOWN
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment