* Written By Rabellino Sergio (rabellino@di.unito.it) For Solaris 2.x
*/
#include "squid.h"
+
+#if HAVE_STDLIB_H
#include <stdlib.h>
+#endif
+#if HAVE_STDIO_H
#include <stdio.h>
+#endif
+#if HAVE_STRING_H
#include <string.h>
+#endif
+#if HAVE_SYSLOG_H
#include <syslog.h>
+#endif
+#if HAVE_SYS_TYPES_H
#include <sys/types.h>
+#endif
+#if HAVE_RPC_RPC_H
#include <rpc/rpc.h>
+#endif
#if _SQUID_FREEBSD_ && !defined(BOOL_DEFINED)
// BUG: FreeBSD rpcsvc/yp_* headers try to redefine bool unless we match their non-standard hack.
#endif
#include <rpcsvc/ypclnt.h>
+
+#if HAVE_RPCSVC_YP_PROT_H
#include <rpcsvc/yp_prot.h>
+#endif
#include "nis_support.h"
-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 <rpc/rpc.h>
+#endif
+]))