From 054b7ffd38b67789fbc28d2a1026076f79d8552d Mon Sep 17 00:00:00 2001 From: Joseph Mingrone Date: Thu, 10 May 2018 16:13:22 -0300 Subject: [PATCH] Specify re_comp and re_exec function names with 'C' linkage This fixes a build error on FreeBSD 11.1 with the base c++ compiler, clang++ version 4.0.0. --- src/core/include/gnuregex.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/include/gnuregex.h b/src/core/include/gnuregex.h index 26faa6ea3..ce3202b4e 100644 --- a/src/core/include/gnuregex.h +++ b/src/core/include/gnuregex.h @@ -466,8 +466,8 @@ _RE_ARGS ((struct re_pattern_buffer *buffer, struct re_registers *regs, unsigned num_regs, regoff_t *starts, regoff_t *ends)); /* 4.2 bsd compatibility. */ -extern char *re_comp _RE_ARGS ((const char *)); -extern int re_exec _RE_ARGS ((const char *)); +extern "C" char *re_comp _RE_ARGS ((const char *)); +extern "C" int re_exec _RE_ARGS ((const char *)); /* POSIX compatibility. */ extern int regcomp _RE_ARGS ((regex_t *preg, const char *pattern, int cflags));