Merge pull request #150 from rdebath/patch-2

Get libpcre working (and by default)
This commit is contained in:
yrutschle 2017-11-24 13:53:52 +01:00 committed by GitHub
commit faa928b75a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View File

@ -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

View File

@ -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);