mirror of
https://github.com/yrutschle/sslh.git
synced 2025-06-14 14:22:12 +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)
|
VERSION=$(shell ./genver.sh -r)
|
||||||
ENABLE_REGEX=1 # Enable regex probes
|
ENABLE_REGEX=1 # Enable regex probes
|
||||||
USELIBCONFIG=1 # Use libconfig? (necessary to use configuration files)
|
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?
|
USELIBWRAP?= # Use libwrap?
|
||||||
USELIBCAP= # Use libcap?
|
USELIBCAP= # Use libcap?
|
||||||
USESYSTEMD= # Make use of systemd socket activation
|
USESYSTEMD= # Make use of systemd socket activation
|
||||||
@ -24,7 +24,7 @@ endif
|
|||||||
CC ?= gcc
|
CC ?= gcc
|
||||||
CFLAGS ?=-Wall -g $(CFLAGS_COV)
|
CFLAGS ?=-Wall -g $(CFLAGS_COV)
|
||||||
|
|
||||||
LIBS=
|
LIBS=-Wl,--as-needed
|
||||||
OBJS=common.o sslh-main.o probe.o tls.o
|
OBJS=common.o sslh-main.o probe.o tls.o
|
||||||
|
|
||||||
ifneq ($(strip $(USELIBWRAP)),)
|
ifneq ($(strip $(USELIBWRAP)),)
|
||||||
@ -38,7 +38,7 @@ endif
|
|||||||
|
|
||||||
ifneq ($(strip $(USELIBPCRE)),)
|
ifneq ($(strip $(USELIBPCRE)),)
|
||||||
CPPFLAGS+=-DLIBPCRE
|
CPPFLAGS+=-DLIBPCRE
|
||||||
LIBS:=$(LIBS) -lpcre
|
LIBS:=$(LIBS) -Wl,-Bstatic -lpcreposix -Wl,-Bdynamic -lpcre
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifneq ($(strip $(USELIBCONFIG)),)
|
ifneq ($(strip $(USELIBCONFIG)),)
|
||||||
@ -52,7 +52,7 @@ ifneq ($(strip $(USELIBCAP)),)
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
ifneq ($(strip $(USESYSTEMD)),)
|
ifneq ($(strip $(USESYSTEMD)),)
|
||||||
LIBS:=$(LIBS) -lsystemd
|
LIBS:=$(LIBS) -Wl,-Bstatic -lsystemd -Wl,-Bdynamic
|
||||||
CPPFLAGS+=-DSYSTEMD
|
CPPFLAGS+=-DSYSTEMD
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -212,7 +212,7 @@ static void setup_regex_probe(struct proto *p, config_setting_t* probes)
|
|||||||
for (i = 0; i < num_probes; i++) {
|
for (i = 0; i < num_probes; i++) {
|
||||||
probe_list[i] = malloc(sizeof(*(probe_list[i])));
|
probe_list[i] = malloc(sizeof(*(probe_list[i])));
|
||||||
expr = config_setting_get_string_elem(probes, 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) {
|
if (res) {
|
||||||
err = malloc(errsize = regerror(res, probe_list[i], NULL, 0));
|
err = malloc(errsize = regerror(res, probe_list[i], NULL, 0));
|
||||||
regerror(res, probe_list[i], err, errsize);
|
regerror(res, probe_list[i], err, errsize);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user