aboutsummaryrefslogtreecommitdiffstats
path: root/src/libutil/regexp.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/libutil/regexp.h')
-rw-r--r--src/libutil/regexp.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/libutil/regexp.h b/src/libutil/regexp.h
index 7c7f1b98e..72ac6eec7 100644
--- a/src/libutil/regexp.h
+++ b/src/libutil/regexp.h
@@ -18,6 +18,15 @@
#include "config.h"
+#ifndef WITH_PCRE2
+#define PCRE_FLAG(x) G_PASTE(PCRE_, x)
+#else
+#ifndef PCRE2_CODE_UNIT_WIDTH
+#define PCRE2_CODE_UNIT_WIDTH 8
+#endif
+#define PCRE_FLAG(x) G_PASTE(PCRE2_, x)
+#endif
+
#define RSPAMD_INVALID_ID ((guint64)-1LL)
#define RSPAMD_REGEXP_FLAG_RAW (1 << 1)
#define RSPAMD_REGEXP_FLAG_NOOPT (1 << 2)