From: Francesco Chemolli Date: Thu, 24 Oct 2013 15:11:16 +0000 (-0600) Subject: basic_nis_auth: Improved portability X-Git-Tag: SQUID_3_4_0_3~28 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a397187d75cda031b36430a114209e73c800cb7a;p=thirdparty%2Fsquid.git basic_nis_auth: Improved portability --- diff --git a/helpers/basic_auth/NIS/nis_support.cc b/helpers/basic_auth/NIS/nis_support.cc index 075eb5b667..01657199ae 100644 --- a/helpers/basic_auth/NIS/nis_support.cc +++ b/helpers/basic_auth/NIS/nis_support.cc @@ -2,12 +2,25 @@ * Written By Rabellino Sergio (rabellino@di.unito.it) For Solaris 2.x */ #include "squid.h" + +#if HAVE_STDLIB_H #include +#endif +#if HAVE_STDIO_H #include +#endif +#if HAVE_STRING_H #include +#endif +#if HAVE_SYSLOG_H #include +#endif +#if HAVE_SYS_TYPES_H #include +#endif +#if HAVE_RPC_RPC_H #include +#endif #if _SQUID_FREEBSD_ && !defined(BOOL_DEFINED) // BUG: FreeBSD rpcsvc/yp_* headers try to redefine bool unless we match their non-standard hack. @@ -15,7 +28,10 @@ #endif #include + +#if HAVE_RPCSVC_YP_PROT_H #include +#endif #include "nis_support.h" diff --git a/helpers/basic_auth/NIS/required.m4 b/helpers/basic_auth/NIS/required.m4 index 4b66a61a87..9d046673e6 100755 --- a/helpers/basic_auth/NIS/required.m4 +++ b/helpers/basic_auth/NIS/required.m4 @@ -1 +1,5 @@ -AC_CHECK_HEADERS([rpcsvc/yp_prot.h],[BUILD_HELPER="NIS"]) +AC_CHECK_HEADERS([sys/types.h rpc/rpc.h rpcsvc/yp_prot.h],[BUILD_HELPER="NIS"],,AC_INCLUDES_DEFAULT([ +#if HAVE_RPC_RPC_H +#include +#endif +]))