Hi, I attempted to compile the new modsecurity wrapper under FreeBSD, thus this small patch proposal.
- the first error encountered was about LIST_HEAD which has two arguments in event2 library. - undefined references but then that can be added in advance with LDFLAGS + adding libfuzzy (I am not sure about this last one but I needed it) Hope it helps. Regards.
From 30ee992c0151419be0c21d98f3f7ea05192f6221 Mon Sep 17 00:00:00 2001 From: David CARLIER <devne...@gmail.com> Date: Wed, 3 May 2017 10:23:08 +0100 Subject: [PATCH] BUG/MINOR: contrib/mod_security: fix build on FreeBSD Fix linker flags settings since 3rd parties libraries are not in /usr/lib Plus libfuzzy needs to be added. undef LIST_HEAD from event2 which conflicts with haproxy's --- contrib/modsecurity/Makefile | 2 +- contrib/modsecurity/spoa.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/contrib/modsecurity/Makefile b/contrib/modsecurity/Makefile index 72956f9e..7853397c 100644 --- a/contrib/modsecurity/Makefile +++ b/contrib/modsecurity/Makefile @@ -26,7 +26,7 @@ LIBXML_INC := /usr/include/libxml2 endif CFLAGS = -g -Wall -pthread -LDFLAGS = -lpthread -levent -levent_pthreads -lcurl -lapr-1 -laprutil-1 -lxml2 -lpcre -lyajl +LDFLAGS += -lpthread -levent -levent_pthreads -lcurl -lapr-1 -laprutil-1 -lxml2 -lpcre -lyajl INCS += -I../../include -I../../ebtree -I$(MODSEC_INC) -I$(APACHE2_INC) -I$(APR_INC) -I$(LIBXML_INC) LIBS = diff --git a/contrib/modsecurity/spoa.h b/contrib/modsecurity/spoa.h index daee6d23..d618f9bb 100644 --- a/contrib/modsecurity/spoa.h +++ b/contrib/modsecurity/spoa.h @@ -20,6 +20,8 @@ #ifndef __SPOA_H__ #define __SPOA_H__ +#include <sys/queue.h> + #include <event2/util.h> #include <event2/event.h> #include <event2/event_struct.h> -- 2.12.1