]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: contrib/modsecurity: BSD build fix
authorDavid Carlier <devnexen@gmail.com>
Tue, 6 Jun 2017 09:20:51 +0000 (10:20 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 19 Jul 2017 12:34:31 +0000 (14:34 +0200)
previous version introduced in the last commit was not the correct one.

contrib/modsecurity/Makefile
contrib/modsecurity/spoa.h

index 7853397cd15edd7cc6f36a06381dbb9b0438d72e..bb918c30b215c0dda980e0c9cb01c93448dfd873 100644 (file)
@@ -2,7 +2,7 @@ DESTDIR    =
 PREFIX     = /usr/local
 BINDIR     = $(PREFIX)/bin
 
-CC = gcc
+CC ?= gcc
 LD = $(CC)
 
 ifeq ($(MODSEC_INC),)
@@ -25,9 +25,17 @@ ifeq ($(LIBXML_INC),)
 LIBXML_INC := /usr/include/libxml2
 endif
 
-CFLAGS  = -g -Wall -pthread
-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)
+ifeq ($(EVENT_LIB),)
+EVENT_LIB := -levent
+endif
+
+ifeq ($(EVENT_INC),)
+EVENT_INC := /usr/include
+endif
+
+CFLAGS  += -g -Wall -pthread
+LDFLAGS += -lpthread  $(EVENT_LIB) -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) -I$(EVENT_INC)
 LIBS =
 
 OBJS = spoa.o modsec_wrapper.o
index d618f9bbe2e1a6eda0f3c14a046816e03c4dc017..ea7a94e9755a8e86016ea02d02090c6a7be36ea4 100644 (file)
@@ -20,7 +20,7 @@
 #ifndef __SPOA_H__
 #define __SPOA_H__
 
-#include <sys/queue.h>
+#undef LIST_HEAD
 
 #include <event2/util.h>
 #include <event2/event.h>