pkgsrc/www/squid27/patches/patch-ak

43 lines
965 B
Text

$NetBSD: patch-ak,v 1.4 2012/11/19 03:02:50 joerg Exp $
* Dirty work around for some version of IP filter.
* Portability with pf(4)'s header.
--- src/client_side.c.orig 2010-02-14 00:46:25.000000000 +0000
+++ src/client_side.c
@@ -36,6 +36,9 @@
#include "squid.h"
#if IPF_TRANSPARENT
+#ifdef debug
+#undef debug /* XXX: IP filter may declar debug(). */
+#endif
#if HAVE_SYS_IOCTL_H
#include <sys/ioctl.h>
#endif
@@ -79,6 +82,12 @@
#elif HAVE_NETINET_IP_NAT_H
#include <netinet/ip_nat.h>
#endif
+
+#undef m_len
+
+/* stolen from defines.h */
+#define debug(SECTION, LEVEL) \
+ !do_debug(SECTION, LEVEL) ? (void) 0 : _db_print
#endif
#if PF_TRANSPARENT
@@ -88,7 +97,12 @@
#include <sys/fcntl.h>
#include <net/if.h>
#include <netinet/in.h>
+#ifdef HAVE_NET_PF_PFVAR_H
+#include <net/pf/pfvar.h>
+#endif /* HAVE_NET_PF_PFVAR_H */
+#ifdef HAVE_NET_PFVAR_H
#include <net/pfvar.h>
+#endif /* HAVE_NET_PFVAR_H */
#endif
#if LINUX_NETFILTER