From a397187d75cda031b36430a114209e73c800cb7a Mon Sep 17 00:00:00 2001 From: Francesco Chemolli Date: Thu, 24 Oct 2013 09:11:16 -0600 Subject: [PATCH] basic_nis_auth: Improved portability --- helpers/basic_auth/NIS/nis_support.cc | 16 ++++++++++++++++ helpers/basic_auth/NIS/required.m4 | 6 +++++- 2 files changed, 21 insertions(+), 1 deletion(-) 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 +])) -- 2.47.2