mirror of
https://github.com/yrutschle/sslh.git
synced 2025-04-15 16:40:34 +03:00
Merge pull request #150 from rdebath/patch-2
Get libpcre working (and by default)
This commit is contained in:
commit
faa928b75a
8
Makefile
8
Makefile
@ -3,7 +3,7 @@
|
||||
VERSION=$(shell ./genver.sh -r)
|
||||
ENABLE_REGEX=1 # Enable regex probes
|
||||
USELIBCONFIG=1 # Use libconfig? (necessary to use configuration files)
|
||||
USELIBPCRE= # Use libpcre? (needed for regex on musl)
|
||||
USELIBPCRE=1 # Use libpcre? (needed for regex on musl)
|
||||
USELIBWRAP?= # Use libwrap?
|
||||
USELIBCAP= # Use libcap?
|
||||
USESYSTEMD= # Make use of systemd socket activation
|
||||
@ -24,7 +24,7 @@ endif
|
||||
CC ?= gcc
|
||||
CFLAGS ?=-Wall -g $(CFLAGS_COV)
|
||||
|
||||
LIBS=
|
||||
LIBS=-Wl,--as-needed
|
||||
OBJS=common.o sslh-main.o probe.o tls.o
|
||||
|
||||
ifneq ($(strip $(USELIBWRAP)),)
|
||||
@ -38,7 +38,7 @@ endif
|
||||
|
||||
ifneq ($(strip $(USELIBPCRE)),)
|
||||
CPPFLAGS+=-DLIBPCRE
|
||||
LIBS:=$(LIBS) -lpcre
|
||||
LIBS:=$(LIBS) -Wl,-Bstatic -lpcreposix -Wl,-Bdynamic -lpcre
|
||||
endif
|
||||
|
||||
ifneq ($(strip $(USELIBCONFIG)),)
|
||||
@ -52,7 +52,7 @@ ifneq ($(strip $(USELIBCAP)),)
|
||||
endif
|
||||
|
||||
ifneq ($(strip $(USESYSTEMD)),)
|
||||
LIBS:=$(LIBS) -lsystemd
|
||||
LIBS:=$(LIBS) -Wl,-Bstatic -lsystemd -Wl,-Bdynamic
|
||||
CPPFLAGS+=-DSYSTEMD
|
||||
endif
|
||||
|
||||
|
@ -212,7 +212,7 @@ static void setup_regex_probe(struct proto *p, config_setting_t* probes)
|
||||
for (i = 0; i < num_probes; i++) {
|
||||
probe_list[i] = malloc(sizeof(*(probe_list[i])));
|
||||
expr = config_setting_get_string_elem(probes, i);
|
||||
res = regcomp(probe_list[i], expr, 0);
|
||||
res = regcomp(probe_list[i], expr, REG_EXTENDED);
|
||||
if (res) {
|
||||
err = malloc(errsize = regerror(res, probe_list[i], NULL, 0));
|
||||
regerror(res, probe_list[i], err, errsize);
|
||||
|
Loading…
x
Reference in New Issue
Block a user