diff options
author | Benjamin Peterson <benjamin@python.org> | 2018-09-12 16:31:17 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-12 16:31:17 -0700 |
commit | 69e96910153219b0b15a18323b917bd74336d229 (patch) | |
tree | 350dccf7172507747325bceb4616f9c33615b68d /configure.ac | |
parent | 669429fb583031c7c87392e30b065e99a2d8ccda (diff) | |
download | cpython-git-69e96910153219b0b15a18323b917bd74336d229.tar.gz |
[2.7] closes bpo-34652: Always disable lchmod on Linux. (GH-9242)
(cherry picked from commit 40caa05fa4d1810a1a6bfc34e0ec930c351089b7)
Co-authored-by: Benjamin Peterson <benjamin@python.org>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index 257c8eb21e..33870961b3 100644 --- a/configure.ac +++ b/configure.ac @@ -3122,7 +3122,7 @@ AC_CHECK_FUNCS(alarm setitimer getitimer bind_textdomain_codeset chown \ gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \ getentropy \ getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \ - initgroups kill killpg lchmod lchown lstat mkfifo mknod mktime mmap \ + initgroups kill killpg lchown lstat mkfifo mknod mktime mmap \ mremap nice pathconf pause plock poll pthread_init \ putenv readlink realpath \ select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \ @@ -3134,6 +3134,13 @@ AC_CHECK_FUNCS(alarm setitimer getitimer bind_textdomain_codeset chown \ sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \ truncate uname unsetenv utimes waitpid wait3 wait4 wcscoll _getpty) +# Force lchmod off for Linux. Linux disallows changing the mode of symbolic +# links. Some libc implementations have a stub lchmod implementation that always +# returns an error. +if test "$MACHDEP" != linux; then + AC_CHECK_FUNC(lchmod) +fi + # For some functions, having a definition is not sufficient, since # we want to take their address. AC_MSG_CHECKING(for chroot) |