BUG/MINOR: contrib/mod_defender: build fix

In similar manner than modsecurity, making the build possible under *BSD flavors, the -lm for ceilf function.
This commit is contained in:
David Carlier 2017-06-07 12:39:16 +01:00 committed by Willy Tarreau
parent 0f4df640d2
commit 80ebd30c96
2 changed files with 14 additions and 5 deletions

View File

@ -2,10 +2,10 @@ DESTDIR =
PREFIX = /usr/local PREFIX = /usr/local
BINDIR = $(PREFIX)/bin BINDIR = $(PREFIX)/bin
CC = gcc CC ?= gcc
LD = $(CC) LD = $(CC)
CXX = g++ CXX ?= g++
ifeq ($(MOD_DEFENDER_SRC),) ifeq ($(MOD_DEFENDER_SRC),)
MOD_DEFENDER_SRC := ./mod_defender_src MOD_DEFENDER_SRC := ./mod_defender_src
@ -19,9 +19,17 @@ ifeq ($(APR_INC),)
APR_INC := /usr/include/apr-1.0 APR_INC := /usr/include/apr-1.0
endif endif
CFLAGS = -g -Wall -pthread ifeq ($(EVENT_LIB),)
LDFLAGS = -lpthread -levent -levent_pthreads -lapr-1 -laprutil-1 -lstdc++ EVENT_LIB := -levent
INCS += -I../../include -I../../ebtree -I$(MOD_DEFENDER_SRC) -I$(APACHE2_INC) -I$(APR_INC) endif
ifeq ($(EVENT_INC),)
EVENT_INC := /usr/include
endif
CFLAGS += -g -Wall -pthread
LDFLAGS += -lpthread $(EVENT_LIB) -levent_pthreads -lapr-1 -laprutil-1 -lstdc++ -lm
INCS += -I../../include -I../../ebtree -I$(MOD_DEFENDER_SRC) -I$(APACHE2_INC) -I$(APR_INC) -I$(EVENT_INC)
LIBS = LIBS =
CXXFLAGS = -g -std=gnu++11 CXXFLAGS = -g -std=gnu++11

View File

@ -16,6 +16,7 @@
#define __SPOA_H__ #define __SPOA_H__
#include <sys/time.h> #include <sys/time.h>
#undef LIST_HEAD
#include <event2/util.h> #include <event2/util.h>
#include <event2/event.h> #include <event2/event.h>