On Tue, Feb 09, 2021 at 03:41:29PM +0100, Renaud Allard wrote:
> 
> On 2/9/21 3:26 PM, Theo Buehler wrote:
> > On Tue, Feb 09, 2021 at 03:19:00PM +0100, Renaud Allard wrote:
> > > Hello,
> > > 
> > > It seems that I didn't test sniproxy deep enough after the patch removal 
> > > for
> > > STAILQ_*. There are core dumps with sniproxy without the patch.
> > I think this needs deeper investigation. Could you share a backtrace or
> > a reproducer for these crashes?
> > 
> My bad, I tried to reproduce it and it seems there was a problem in my
> CFLAGS which caused the issue.
> 
> So here is the patch only for the -fno-common
> 
> 

While your patch fixes the compilation, I'd suggest going with the usual
change, which is also the one upstream merged:

https://github.com/dlundquist/sniproxy/pull/349

I added a patch for a warning about an incorrect format string on top.

Are you ok with this?

Index: Makefile
===================================================================
RCS file: /cvs/ports/net/sniproxy/Makefile,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 Makefile
--- Makefile    8 Apr 2020 04:56:52 -0000       1.1.1.1
+++ Makefile    9 Feb 2021 14:44:47 -0000
@@ -6,6 +6,8 @@ GH_ACCOUNT =    dlundquist
 GH_PROJECT =   sniproxy
 GH_TAGNAME =   0.6.0
 
+REVISION =     0
+
 CATEGORIES =   net
 
 HOMEPAGE =     https://github.com/dlundquist/sniproxy
Index: patches/patch-src_config_c
===================================================================
RCS file: patches/patch-src_config_c
diff -N patches/patch-src_config_c
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_config_c  9 Feb 2021 14:51:40 -0000
@@ -0,0 +1,16 @@
+$OpenBSD$
+
+Fix incorrect format string
+
+Index: src/config.c
+--- src/config.c.orig
++++ src/config.c
+@@ -234,7 +234,7 @@ init_config(const char *filename, struct ev_loop *loop
+         err("error parsing %s at %jd near:", filename, whence);
+         fseek(file, -20, SEEK_CUR);
+         for (int i = 0; i < 5; i++)
+-            err(" %jd\t%s", ftell(file), fgets(line, sizeof(line), file));
++            err(" %ld\t%s", ftell(file), fgets(line, sizeof(line), file));
+ 
+         free_config(config, loop);
+         config = NULL;
Index: patches/patch-src_http_h
===================================================================
RCS file: patches/patch-src_http_h
diff -N patches/patch-src_http_h
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_http_h    9 Feb 2021 14:50:24 -0000
@@ -0,0 +1,15 @@
+$OpenBSD$
+
+https://github.com/dlundquist/sniproxy/pull/349
+
+Index: src/http.h
+--- src/http.h.orig
++++ src/http.h
+@@ -29,6 +29,6 @@
+ #include <stdio.h>
+ #include "protocol.h"
+ 
+-const struct Protocol *const http_protocol;
++extern const struct Protocol *const http_protocol;
+ 
+ #endif
Index: patches/patch-src_tls_h
===================================================================
RCS file: patches/patch-src_tls_h
diff -N patches/patch-src_tls_h
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_tls_h     9 Feb 2021 14:50:30 -0000
@@ -0,0 +1,15 @@
+$OpenBSD$
+
+https://github.com/dlundquist/sniproxy/pull/349
+
+Index: src/tls.h
+--- src/tls.h.orig
++++ src/tls.h
+@@ -28,6 +28,6 @@
+ 
+ #include "protocol.h"
+ 
+-const struct Protocol *const tls_protocol;
++extern const struct Protocol *const tls_protocol;
+ 
+ #endif

Reply via email to