Quick fix for build problem with IP Filter 4.1.34 (NetBSD 6.1
and may be older). Tested on NetBSD 6_STABLE and 7,0_RC3.
This commit is contained in:
parent
2f62cf5cb0
commit
445ceaf5fa
3 changed files with 53 additions and 1 deletions
|
@ -1,9 +1,11 @@
|
|||
$NetBSD: distinfo,v 1.39 2015/09/22 13:39:31 taca Exp $
|
||||
$NetBSD: distinfo,v 1.40 2015/09/23 03:59:03 taca Exp $
|
||||
|
||||
SHA1 (squid-3.5.9.tar.xz) = 4856ca628cafbd1cbfa0ddcbadec440e6f4c2da7
|
||||
RMD160 (squid-3.5.9.tar.xz) = 090d9ba34bf51d1bfc8d4795080024835f16c9f9
|
||||
Size (squid-3.5.9.tar.xz) = 2296384 bytes
|
||||
SHA1 (patch-compat_compat.h) = d6cd93fa7a6d0faad3bf1aca8ae4fa5c984fe288
|
||||
SHA1 (patch-compat_debug.cc) = 95fc0aa6901834175b9bbf1ddb51eeb7d9ddc8c7
|
||||
SHA1 (patch-compat_debug.h) = a828871704b1578b520d412393c3d398099a5fdc
|
||||
SHA1 (patch-errors_Makefile.in) = afbac822ac84d5e1734d55fc625e949ae0b85289
|
||||
SHA1 (patch-src_Makefile.in) = 7233a92a4f6ecc06d88e125f08f7413e0741f3b6
|
||||
SHA1 (patch-src_SquidNew.cc) = eef6e72e168cf7f40518fab13dc2f55ed0268db9
|
||||
|
|
23
www/squid3/patches/patch-compat_debug.cc
Normal file
23
www/squid3/patches/patch-compat_debug.cc
Normal file
|
@ -0,0 +1,23 @@
|
|||
$NetBSD: patch-compat_debug.cc,v 1.1 2015/09/23 03:59:04 taca Exp $
|
||||
|
||||
Build fix with IP Filter 4.1.34 (NetBSD 6.1 and may be older).
|
||||
|
||||
* Avoid to define debug CPP macro.
|
||||
* Make the proto typoe of debug() match with IP Filter 4.1.34.
|
||||
|
||||
--- compat/debug.cc.orig 2015-09-17 13:06:28.000000000 +0000
|
||||
+++ compat/debug.cc
|
||||
@@ -12,11 +12,11 @@
|
||||
/* default off */
|
||||
int debug_enabled = 0;
|
||||
|
||||
-#ifndef __GNUC__
|
||||
+#if defined(__GNUC__) && defined(HAVE_NETINET_IP_FIL_H)
|
||||
/* under gcc a macro define in compat/debug.h is used instead */
|
||||
|
||||
void
|
||||
-debug(const char *format,...)
|
||||
+debug(char *format,...)
|
||||
{
|
||||
if (!debug_enabled)
|
||||
return;
|
27
www/squid3/patches/patch-compat_debug.h
Normal file
27
www/squid3/patches/patch-compat_debug.h
Normal file
|
@ -0,0 +1,27 @@
|
|||
$NetBSD: patch-compat_debug.h,v 1.1 2015/09/23 03:59:04 taca Exp $
|
||||
|
||||
Build fix with IP Filter 4.1.34 (NetBSD 6.1 and may be older).
|
||||
|
||||
* Avoid to define debug CPP macro.
|
||||
* Make the proto typoe of debug() match with IP Filter 4.1.34.
|
||||
|
||||
--- compat/debug.h.orig 2015-09-17 13:06:28.000000000 +0000
|
||||
+++ compat/debug.h
|
||||
@@ -23,7 +23,7 @@
|
||||
SQUIDCEXTERN int debug_enabled;
|
||||
|
||||
/* the macro overload style is really a gcc-ism */
|
||||
-#ifdef __GNUC__
|
||||
+#if defined(__GNUC__) && !defined(HAVE_NETINET_IP_FIL_H)
|
||||
|
||||
#define debug(X...) \
|
||||
if (debug_enabled) { \
|
||||
@@ -34,7 +34,7 @@ SQUIDCEXTERN int debug_enabled;
|
||||
#else /* __GNUC__ */
|
||||
|
||||
/* non-GCC compilers can't do the above macro define yet. */
|
||||
-void debug(const char *format,...);
|
||||
+void debug(char *format,...);
|
||||
#endif
|
||||
|
||||
#endif /* COMPAT_DEBUG_H */
|
Loading…
Reference in a new issue