From: Eric Bollengier Date: Wed, 2 May 2007 14:08:11 +0000 (+0000) Subject: ebl fix freebsd compilation bug X-Git-Tag: Release-7.0.0~6451 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=bbac8e21e80e6d378df495f51915a2c8aeca8e11;p=bacula%2Fbacula ebl fix freebsd compilation bug git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@4678 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/bacula/src/lib/breg.c b/bacula/src/lib/breg.c index 2b121912a1..f8addc85ef 100644 --- a/bacula/src/lib/breg.c +++ b/bacula/src/lib/breg.c @@ -226,7 +226,7 @@ char *BREGEXP::replace(const char *fname) { success = false; /* use this.success to known if it's ok */ int flen = strlen(fname); - int rc = regexec(&preg, fname, RE_NREGS, regs, 0); + int rc = regexec(&preg, fname, BREG_NREGS, regs, 0); if (rc == REG_NOMATCH) { Dmsg0(500, "bregexp: regex mismatch\n"); diff --git a/bacula/src/lib/breg.h b/bacula/src/lib/breg.h index 5ac23759a6..1882b629de 100644 --- a/bacula/src/lib/breg.h +++ b/bacula/src/lib/breg.h @@ -54,6 +54,8 @@ * free_bregexp(breg); */ +#define BREG_NREGS 11 + /* * Structure for BREGEXP ressource */ @@ -69,7 +71,7 @@ public: POOLMEM *expr; /* search epression */ POOLMEM *subst; /* substitution */ regex_t preg; /* regex_t result of regcomp() */ - regmatch_t regs[RE_NREGS]; /* contains match */ + regmatch_t regs[BREG_NREGS]; /* contains match */ char *eor; /* end of regexp in expr */ char *return_fname(const char *fname, int len); /* return fname as result */