freebsd-ports/net/vortex/files/patch-vortex.c
Wesley Shields 4863f45fda Vortex is a near real time IDS and network surveillance engine for TCP stream
data. Vortex decouples packet capture, stream reassembly, and real time
constraints from analysis. Vortex is used to provide TCP stream data to a
separate analyzer program.

Feature safe: yes
2013-04-18 15:03:15 +00:00

30 lines
694 B
C

--- ./vortex.c.orig 2011-09-16 15:35:15.000000000 -0400
+++ ./vortex.c 2013-04-18 09:50:33.000000000 -0400
@@ -38,6 +38,12 @@
#ifdef linux
#include <syscall.h>
+#elif defined(__FreeBSD__)
+#include <sys/param.h>
+#include <sys/cpuset.h>
+typedef cpuset_t cpu_set_t;
+#include <limits.h>
+#define SIZE_MAX SSIZE_MAX
#endif
#include <unistd.h>
@@ -65,8 +71,13 @@
#endif
//don't ask me why this isn't in headers?
-#define gettid() syscall(__NR_gettid)
+#ifdef linux
#define my_sched_setaffinity(a,b,c) sched_setaffinity(a, b, c)
+#define gettid() syscall(__NR_gettid)
+#elif defined(__FreeBSD__)
+#define my_sched_setaffinity(a,b,c) (-1)
+#define gettid() 0
+#endif
//TODO LIST: