diff options
Diffstat (limited to 'contrib/amd/m4/macros/func_bad_yp_all.m4')
-rw-r--r-- | contrib/amd/m4/macros/func_bad_yp_all.m4 | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/contrib/amd/m4/macros/func_bad_yp_all.m4 b/contrib/amd/m4/macros/func_bad_yp_all.m4 new file mode 100644 index 0000000..48ffb45 --- /dev/null +++ b/contrib/amd/m4/macros/func_bad_yp_all.m4 @@ -0,0 +1,27 @@ +dnl Check for a yp_all() function that does not leak a file descriptor +dnl to the ypserv process. +AC_DEFUN(AMU_FUNC_BAD_YP_ALL, +[ +AC_CACHE_CHECK(for a file-descriptor leakage clean yp_all, +ac_cv_func_yp_all_clean, +[ +# clean by default +ac_cv_func_yp_all_clean=yes +# select the correct type +case "${host_os_name}" in + irix* ) + ac_cv_func_yp_all_clean=no ;; + linux* ) + # RedHat 5.1 systems with glibc glibc-2.0.7-19 or below + # leak a UDP socket from yp_all() + case "`cat /etc/redhat-release /dev/null 2>/dev/null`" in + *5.1* ) + ac_cv_func_yp_all_clean=no ;; + esac +esac +]) +if test $ac_cv_func_yp_all_clean = no +then + AC_DEFINE(HAVE_BAD_YP_ALL) +fi +]) |