]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Fix NIS helper build on FreeBSD
authorPawel Worach <pawel.worach@gmail.com>
Sun, 14 Aug 2011 12:42:59 +0000 (00:42 +1200)
committerAmos Jeffries <squid3@treenet.co.nz>
Sun, 14 Aug 2011 12:42:59 +0000 (00:42 +1200)
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

index 9f33d83a5ec01657b2a23ff61449b569fc840c2c..d6558bafda850a17194e3fc1f0f072cb754fba9b 100644 (file)
@@ -8,6 +8,12 @@
 #include <syslog.h>
 #include <sys/types.h>
 #include <rpc/rpc.h>
+
+#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 <rpcsvc/ypclnt.h>
 #include <rpcsvc/yp_prot.h>