summaryrefslogtreecommitdiff
path: root/src/errors.c
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2019-05-21 14:59:55 +0200
committerGitHub <noreply@github.com>2019-05-21 14:59:55 +0200
commit3d9e82fdd5619985b56ca25fb1f89de3dfabc029 (patch)
tree689c3f2a148574fdaeb48f8d04648707c61230ed /src/errors.c
parent954f5357282233ecdfea226c819f3f3884949cdb (diff)
parentafb04a95af939295d9baebac5bea72c070001d9e (diff)
downloadlibgit2-3d9e82fdd5619985b56ca25fb1f89de3dfabc029.tar.gz
Merge pull request #4935 from libgit2/ethomson/pcre
Use PCRE for our fallback regex engine when regcomp_l is unavailable
Diffstat (limited to 'src/errors.c')
-rw-r--r--src/errors.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/errors.c b/src/errors.c
index afa340936..8ef491916 100644
--- a/src/errors.c
+++ b/src/errors.c
@@ -105,16 +105,16 @@ void git_error_set_str(int error_class, const char *string)
set_error_from_buffer(error_class);
}
-int git_error_set_regex(const regex_t *regex, int error_code)
+int git_error_set_regex(const p_regex_t *regex, int error_code)
{
char error_buf[1024];
assert(error_code);
- regerror(error_code, regex, error_buf, sizeof(error_buf));
+ p_regerror(error_code, regex, error_buf, sizeof(error_buf));
git_error_set_str(GIT_ERROR_REGEX, error_buf);
- if (error_code == REG_NOMATCH)
+ if (error_code == P_REG_NOMATCH)
return GIT_ENOTFOUND;
return GIT_EINVALIDSPEC;