]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Fix NIS helper build on FreeBSD
authorAmos Jeffries <squid3@treenet.co.nz>
Sat, 27 Aug 2011 07:45:03 +0000 (01:45 -0600)
committerAmos Jeffries <squid3@treenet.co.nz>
Sat, 27 Aug 2011 07:45:03 +0000 (01:45 -0600)
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/YP/nis_support.c

index 34137d18c24710918fe13dc523de21008bbe1540..026e3ab5b07da529264e4dac7c3d8b8940bb8fdd 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>