summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile3
-rw-r--r--compat/regex/regex.h5
2 files changed, 8 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 58b92af54b..6ca9f4dd22 100644
--- a/Makefile
+++ b/Makefile
@@ -1216,6 +1216,9 @@ endif
ifneq ($(filter leak,$(SANITIZERS)),)
BASIC_CFLAGS += -DSUPPRESS_ANNOTATED_LEAKS
endif
+ifneq ($(filter address,$(SANITIZERS)),)
+NO_REGEX = NeededForASAN
+endif
endif
ifndef sysconfdir
diff --git a/compat/regex/regex.h b/compat/regex/regex.h
index 4d81358a83..bd113cfc0e 100644
--- a/compat/regex/regex.h
+++ b/compat/regex/regex.h
@@ -41,6 +41,11 @@
extern "C" {
#endif
+#define regcomp git_regcomp
+#define regexec git_regexec
+#define regerror git_regerror
+#define regfree git_regfree
+
/* The following two types have to be signed and unsigned integer type
wide enough to hold a value of a pointer. For most ANSI compilers
ptrdiff_t and size_t should be likely OK. Still size of these two