diff options
author | Darren Tucker <dtucker@dtucker.net> | 2018-02-25 13:55:41 +0100 |
---|---|---|
committer | Darren Tucker <dtucker@dtucker.net> | 2018-02-25 14:14:42 +0100 |
commit | c7b5a47e3b9db9a0f0198f9c90c705f6307afc2b (patch) | |
tree | f0b486ac5bb76056b06d55eff3dd37e7d503a697 /configure.ac | |
parent | Add no-op getsid implmentation. (diff) | |
download | openssh-c7b5a47e3b9db9a0f0198f9c90c705f6307afc2b.tar.xz openssh-c7b5a47e3b9db9a0f0198f9c90c705f6307afc2b.zip |
Invert sense of getpgrp test.
AC_FUNC_GETPGRP tests if getpgrp(0) works, which it does if it's not
declared. Instead, test if the zero-arg version we want to use works.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac index f96c70bcd..d3deac832 100644 --- a/configure.ac +++ b/configure.ac @@ -1736,7 +1736,6 @@ AC_CHECK_FUNCS([ \ getpeereid \ getpeerucred \ getpgid \ - getpgrp \ _getpty \ getrlimit \ getsid \ @@ -2413,7 +2412,16 @@ static void sighandler(int sig) { _exit(1); } ) fi -AC_FUNC_GETPGRP +AC_CHECK_FUNCS([getpgrp],[ + AC_MSG_CHECKING([if getpgrp accepts zero args]) + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([[$ac_includes_default]], [[ getpgrp(); ]])], + [ AC_MSG_RESULT([yes]) + AC_DEFINE([GETPGRP_VOID], [1], [getpgrp takes zero args])], + [ AC_MSG_RESULT([no]) + AC_DEFINE([GETPGRP_VOID], [0], [getpgrp takes one arg])] + ) +]) # Search for OpenSSL saved_CPPFLAGS="$CPPFLAGS" |