From: Todd C. Miller Date: Wed, 24 Feb 2016 23:00:08 +0000 (-0700) Subject: Don't check for posix_spawn() or posix_spawnp() if we were unable X-Git-Tag: SUDO_1_8_16^2~12 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4b079ee7e6171e26b2fc11a7863708fde0a6bef5;p=sudo Don't check for posix_spawn() or posix_spawnp() if we were unable to find spawn.h. This should only be a problem on systems with broken headers. Bug #730 --- diff --git a/configure b/configure index 9a328c7c4..4cdba6eda 100755 --- a/configure +++ b/configure @@ -19952,7 +19952,8 @@ fi done # Check for posix_spawn, and posix_spawnp - for ac_func in posix_spawn posix_spawnp + if test X"$ac_cv_header_spawn_h" = X"yes"; then + for ac_func in posix_spawn posix_spawnp do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" @@ -19964,6 +19965,7 @@ _ACEOF fi done + fi fi cat confdefs.h - <<_ACEOF >conftest.$ac_ext diff --git a/configure.ac b/configure.ac index d5aba59b0..4c063979f 100644 --- a/configure.ac +++ b/configure.ac @@ -2689,7 +2689,9 @@ if test X"$with_noexec" != X"no"; then # Check for non-standard exec functions AC_CHECK_FUNCS([exect execvP execvpe]) # Check for posix_spawn, and posix_spawnp - AC_CHECK_FUNCS([posix_spawn posix_spawnp]) + if test X"$ac_cv_header_spawn_h" = X"yes"; then + AC_CHECK_FUNCS([posix_spawn posix_spawnp]) + fi fi dnl