From cffd3811f2ddb0757b8d20acbce994689e7a842a Mon Sep 17 00:00:00 2001 From: Jonathan McCrohan Date: Tue, 7 Jul 2015 22:24:56 +0100 Subject: [PATCH] probe: remove non-POSIX REG_STARTEND REGEX REG_STARTEND is not required as the regmatch_t struct being passed to regexec() hardcodes rm_so as 0. This issue was uncovered because OpenWrt recently moved away from uClibc to musl. Closes: #40 Signed-off-by: Jonathan McCrohan --- probe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/probe.c b/probe.c index a2b2218..0e7f651 100644 --- a/probe.c +++ b/probe.c @@ -247,7 +247,7 @@ static int regex_probe(const char *p, int len, struct proto *proto) regex_t **probe = proto->data; regmatch_t pos = { 0, len }; - for (; *probe && regexec(*probe, p, 0, &pos, REG_STARTEND); probe++) + for (; *probe && regexec(*probe, p, 0, &pos, 0); probe++) /* try them all */; return (*probe != NULL);