Skip to content

Commit a188fac

Browse files
author
Sascha Schumann
committed
Support systems without NIS functions, but with non-working libnsl
1 parent 06f6e47 commit a188fac

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

configure.in

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -293,10 +293,18 @@ AC_CHECK_LIB(socket, socket, [
293293
dnl Some systems (OpenServer 5) dislike -lsocket -lnsl, so we try
294294
dnl to avoid -lnsl checks, if we already have the functions which
295295
dnl are usually in libnsl
296+
dnl Also, uClibc will bark at linking with glibc's libnsl.
296297
298+
unset ac_cv_func_gethostname
297299
unset ac_cv_func_yp_get_default_domain
298-
AC_CHECK_FUNC(yp_get_default_domain,
299-
[php_no_nsl_checks=yes],[])
300+
AC_CHECK_FUNC(gethostname, [
301+
php_no_nsl_checks=yes
302+
],[
303+
AC_CHECK_FUNC(yp_get_default_domain, [
304+
php_no_nsl_checks=yes
305+
])
306+
])
307+
unset ac_cv_func_gethostname
300308
unset ac_cv_func_yp_get_default_domain
301309
302310
if test "$php_no_nsl_checks" != "yes"; then

0 commit comments

Comments
 (0)