From a8f7fbed072f8a23e26aa9fdfdc0028f815b74fa Mon Sep 17 00:00:00 2001 From: Pawel Worach Date: Mon, 15 Aug 2011 00:42:59 +1200 Subject: [PATCH] Fix NIS helper build on FreeBSD Fails on clang++ and other strict compilers due to missing __cplusplus checks in FreeBSD system headers and yp_prot.h typedefs bool unless BOOL_DEFINED is defined. --- helpers/basic_auth/NIS/nis_support.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/helpers/basic_auth/NIS/nis_support.cc b/helpers/basic_auth/NIS/nis_support.cc index 9f33d83a5e..d6558bafda 100644 --- a/helpers/basic_auth/NIS/nis_support.cc +++ b/helpers/basic_auth/NIS/nis_support.cc @@ -8,6 +8,12 @@ #include #include #include + +#if _SQUID_FREEBSD_ && !defined(BOOL_DEFINED) +// BUG: FreeBSD rpcsvc/yp_* headers try to redefine bool unless we match their non-standard hack. +#define BOOL_DEFINED +#endif + #include #include -- 2.47.2