This allows www/squidguard to build with -fno-common. Compile tested
only, on amd64. I'm not sure if this requires a bump or not.
Thanks,
Jeremy
Index: patches/patch-src_lex_yy_c_flex
===================================================================
RCS file: patches/patch-src_lex_yy_c_flex
diff -N patches/patch-src_lex_yy_c_flex
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_lex_yy_c_flex 29 Jan 2021 19:02:36 -0000
@@ -0,0 +1,14 @@
+$OpenBSD$
+
+Index: src/lex.yy.c.flex
+--- src/lex.yy.c.flex.orig
++++ src/lex.yy.c.flex
+@@ -262,7 +262,7 @@ static void yy_flex_free YY_PROTO(( void * ));
+ #define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
+
+ typedef unsigned char YY_CHAR;
+-FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
++extern FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
+ typedef int yy_state_type;
+ extern char *yytext;
+ #define yytext_ptr yytext
Index: patches/patch-src_main_c
===================================================================
RCS file: /cvs/ports/www/squidguard/patches/patch-src_main_c,v
retrieving revision 1.2
diff -u -p -r1.2 patch-src_main_c
--- patches/patch-src_main_c 15 May 2014 17:27:39 -0000 1.2
+++ patches/patch-src_main_c 29 Jan 2021 18:58:54 -0000
@@ -1,10 +1,15 @@
---- src/main.c.orig Sat Aug 30 12:27:41 2008
-+++ src/main.c Thu May 15 16:32:39 2014
-
-Fix broken use of the old squid-2.5 helper protocol, see
-http://bugs.squid-cache.org/show_bug.cgi?id=3978#c3
-
-@@ -175,7 +175,7 @@ int main(argc, argv, envp)
+Index: src/main.c
+--- src/main.c.orig
++++ src/main.c
+@@ -16,6 +16,7 @@
+ (GPL) along with this program.
+ */
+
++#define MAIN_EXTERN
+ #include "sg.h"
+
+ struct Setting *lastSetting = NULL;
+@@ -175,7 +176,7 @@ int main(argc, argv, envp)
sgReloadConfig();
}
if(failsafe_mode) {
@@ -13,7 +18,7 @@ http://bugs.squid-cache.org/show_bug.cgi
fflush(stdout);
if(sig_hup){
sgReloadConfig();
-@@ -184,7 +184,7 @@ int main(argc, argv, envp)
+@@ -184,7 +185,7 @@ int main(argc, argv, envp)
}
if(parseLine(buf,&squidInfo) != 1){
sgLogError("Error parsing squid line: %s",buf);
@@ -22,7 +27,7 @@ http://bugs.squid-cache.org/show_bug.cgi
}
else {
src = Source;
-@@ -196,14 +196,14 @@ int main(argc, argv, envp)
+@@ -196,14 +197,14 @@ int main(argc, argv, envp)
acl = sgAclCheckSource(src);
if((redirect = sgAclAccess(src,acl,&squidInfo)) == NULL){
if(src == NULL || src->cont_search == 0){
@@ -39,7 +44,7 @@ http://bugs.squid-cache.org/show_bug.cgi
break;
}
} else {
-@@ -215,9 +215,10 @@ int main(argc, argv, envp)
+@@ -215,9 +216,10 @@ int main(argc, argv, envp)
squidInfo.ident[0] = '-';
squidInfo.ident[1] = '\0';
}
Index: patches/patch-src_sg_h_in
===================================================================
RCS file: /cvs/ports/www/squidguard/patches/patch-src_sg_h_in,v
retrieving revision 1.2
diff -u -p -r1.2 patch-src_sg_h_in
--- patches/patch-src_sg_h_in 12 Aug 2013 20:01:49 -0000 1.2
+++ patches/patch-src_sg_h_in 29 Jan 2021 18:58:57 -0000
@@ -6,8 +6,9 @@ Fix segfault on 64-bit due to calling an
is supposed to return a pointer (64-bit) but when undeclared returns an int
(32-bit).
---- src/sg.h.in.orig Fri Nov 16 08:58:32 2007
-+++ src/sg.h.in Mon Aug 12 02:40:28 2013
+Index: src/sg.h.in
+--- src/sg.h.in.orig
++++ src/sg.h.in
@@ -73,7 +73,7 @@ int tolower();
#define REQUEST_TYPE_REDIRECT 2
#define REQUEST_TYPE_PASS 3
@@ -17,7 +18,30 @@ is supposed to return a pointer (64-bit)
#define DEFAULT_LOGFILE "squidGuard.log"
#define WARNING_LOGFILE "squidGuard.log"
-@@ -412,6 +412,7 @@ char *niso __P((time_t));
+@@ -114,8 +114,12 @@ int tolower();
+ #define REDIRECT_PERMANENT "301:"
+ #define REDIRECT_TEMPORARILY "302:"
+
+-char *progname;
++#ifndef MAIN_EXTERN
++#define MAIN_EXTERN extern
++
No comments:
Post a Comment