Hello,
diff was messed up, new one attached.
Kind regards,
Markus
On Wed, Jul 15, 2026 at 09:41:35PM +0200, Markus Lude wrote:
> Hello,
>
> snort 2.9.20, which is currently in ports, is the last version of snort
> 2.x. It is still supported but I repeatedly got no answer for how long.
>
> For some years now there is snort 3. snort 3 has an additional
> dependancy on hwloc from https://www.open-mpi.org/projects/hwloc/
> hwloc doesnt support OpenBSD.
>
> snort 2.9.20 in ports broke with the update to llvm 22.
> Attached is a diff which let snort 2 build again.
>
> I'd like to drop MAINTAINER from net/snort and the dependancy net/daq.
> Probably it is better to remove both ports.
>
> I'd like to thank the developers who helped me with testing and
> commiting updates to those ports over all the years. Thank you!
>
> Kind regards,
> Markus
Index: Makefile
===================================================================
RCS file: /cvs/ports/net/snort/Makefile,v
retrieving revision 1.124
diff -u -p -r1.124 Makefile
--- Makefile 16 Jun 2026 16:15:28 -0000 1.124
+++ Makefile 15 Jul 2026 19:47:15 -0000
@@ -1,5 +1,3 @@
-BROKEN = bpf_timeval vs timeval mix-ups result in failure with
llvm22
-
COMMENT = highly flexible sniffer/NIDS
DISTNAME = snort-2.9.20
Index: patches/patch-src_dynamic-plugins_sf_dynamic_plugins_c
===================================================================
RCS file: patches/patch-src_dynamic-plugins_sf_dynamic_plugins_c
diff -N patches/patch-src_dynamic-plugins_sf_dynamic_plugins_c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_dynamic-plugins_sf_dynamic_plugins_c 15 Jul 2026
19:47:15 -0000
@@ -0,0 +1,14 @@
+sf_dynamic_plugins.c:1844:25: error: incompatible pointer types passing
'struct timeval *' to parameter of type 'struct bpf_timeval *'
+
+Index: src/dynamic-plugins/sf_dynamic_plugins.c
+--- src/dynamic-plugins/sf_dynamic_plugins.c.orig
++++ src/dynamic-plugins/sf_dynamic_plugins.c
+@@ -1839,7 +1839,7 @@ time_t DynamicPktTime(void)
+ return packet_time();
+ }
+
+-void DynamicGetPktTimeOfDay(struct timeval *tv)
++void DynamicGetPktTimeOfDay(struct bpf_timeval *tv)
+ {
+ packet_gettimeofday(tv);
+ }
Index: patches/patch-src_packet_time_c
===================================================================
RCS file: patches/patch-src_packet_time_c
diff -N patches/patch-src_packet_time_c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_packet_time_c 15 Jul 2026 19:47:15 -0000
@@ -0,0 +1,26 @@
+snort.c:1646:24: error: incompatible pointer types passing 'const struct
bpf_timeval *' to parameter of type 'const struct timeval *'
+
+Index: src/packet_time.c
+--- src/packet_time.c.orig
++++ src/packet_time.c
+@@ -37,9 +37,9 @@
+
+ #include "packet_time.h"
+
+-static struct timeval s_recent_packet = { 0, 0 };
++static struct bpf_timeval s_recent_packet = { 0, 0 };
+
+-void packet_time_update(const struct timeval *cur_tv)
++void packet_time_update(const struct bpf_timeval *cur_tv)
+ {
+ s_recent_packet = *cur_tv;
+ }
+@@ -49,7 +49,7 @@ time_t packet_time(void)
+ return s_recent_packet.tv_sec;
+ }
+
+-void packet_gettimeofday(struct timeval *tv)
++void packet_gettimeofday(struct bpf_timeval *tv)
+ {
+ *tv = s_recent_packet;
+ }
Index: patches/patch-src_packet_time_h
===================================================================
RCS file: patches/patch-src_packet_time_h
diff -N patches/patch-src_packet_time_h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_packet_time_h 15 Jul 2026 19:47:15 -0000
@@ -0,0 +1,18 @@
+snort.c:1646:24: error: incompatible pointer types passing 'const struct
bpf_timeval *' to parameter of type 'const struct timeval *'
+
+Index: src/packet_time.h
+--- src/packet_time.h.orig
++++ src/packet_time.h
+@@ -31,8 +31,10 @@
+ #include <sys/time.h>
+ #endif
+
+-void packet_time_update(const struct timeval *cur_tv);
++#include <net/bpf.h>
++
++void packet_time_update(const struct bpf_timeval *cur_tv);
+ time_t packet_time(void);
+-void packet_gettimeofday(struct timeval *tv);
++void packet_gettimeofday(struct bpf_timeval *tv);
+
+ #endif /* _PACKET_TIME_H */
Index: patches/patch-src_preprocessors_Stream6_snort_stream_tcp_c
===================================================================
RCS file:
/cvs/ports/net/snort/patches/patch-src_preprocessors_Stream6_snort_stream_tcp_c,v
retrieving revision 1.16
diff -u -p -r1.16 patch-src_preprocessors_Stream6_snort_stream_tcp_c
--- patches/patch-src_preprocessors_Stream6_snort_stream_tcp_c 24 Aug 2022
14:14:57 -0000 1.16
+++ patches/patch-src_preprocessors_Stream6_snort_stream_tcp_c 15 Jul 2026
19:47:15 -0000
@@ -1,6 +1,26 @@
+snort_stream_tcp.c:6721:26: error: incompatible pointer types passing 'const
struct bpf_timeval *' to parameter of type 'const struct timeval *'
+
Index: src/preprocessors/Stream6/snort_stream_tcp.c
--- src/preprocessors/Stream6/snort_stream_tcp.c.orig
+++ src/preprocessors/Stream6/snort_stream_tcp.c
+@@ -354,7 +354,7 @@ typedef struct _StreamSegment
+ #ifdef DEBUG
+ int ordinal;
+ #endif
+- struct timeval tv;
++ struct bpf_timeval tv;
+ uint32_t caplen;
+ uint32_t pktlen;
+
+@@ -6600,7 +6600,7 @@ static inline int SegmentFastTrack(StreamSegment *tail
+ }
+
+ static inline StreamSegment* SegmentAlloc (
+- Packet* p, const struct timeval* tv, uint32_t caplen, uint32_t
pktlen, const uint8_t* pkt)
++ Packet* p, const struct bpf_timeval* tv, uint32_t caplen, uint32_t
pktlen, const uint8_t* pkt)
+ {
+ StreamSegment* ss;
+ unsigned size = sizeof(*ss);
@@ -8953,7 +8953,7 @@ static int ProcessTcp(SessionControlBlock *scb, Packet
char src_addr[17];
char dst_addr[17];