summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorDonald Sharp <donaldsharp72@gmail.com>2022-11-14 13:57:47 +0100
committerGitHub <noreply@github.com>2022-11-14 13:57:47 +0100
commitedb904e81cdbd9c5b869f2e029d50fa13d69f7b5 (patch)
treee0356893770e93d9f87b21b1b70b260fa8a8560c /lib
parentMerge pull request #12308 from mtomaschewski/pam-account-warning (diff)
parentdocker: Compile Alpine image using PCRE2 (diff)
downloadfrr-edb904e81cdbd9c5b869f2e029d50fa13d69f7b5.tar.xz
frr-edb904e81cdbd9c5b869f2e029d50fa13d69f7b5.zip
Merge pull request #12234 from opensourcerouting/fix/bgp_regex_pcre
docker: Use PCRE2 for Alpine
Diffstat (limited to 'lib')
-rw-r--r--lib/frrstr.c9
-rw-r--r--lib/frrstr.h9
-rw-r--r--lib/vty.c9
-rw-r--r--lib/vty.h9
4 files changed, 28 insertions, 8 deletions
diff --git a/lib/frrstr.c b/lib/frrstr.c
index 1b98b224c..d66c6f8c1 100644
--- a/lib/frrstr.c
+++ b/lib/frrstr.c
@@ -23,11 +23,16 @@
#include <string.h>
#include <ctype.h>
#include <sys/types.h>
-#ifdef HAVE_LIBPCREPOSIX
+#ifdef HAVE_LIBPCRE2_POSIX
+#ifndef _FRR_PCRE2_POSIX
+#define _FRR_PCRE2_POSIX
+#include <pcre2posix.h>
+#endif /* _FRR_PCRE2_POSIX */
+#elif defined(HAVE_LIBPCREPOSIX)
#include <pcreposix.h>
#else
#include <regex.h>
-#endif /* HAVE_LIBPCREPOSIX */
+#endif /* HAVE_LIBPCRE2_POSIX */
#include "frrstr.h"
#include "memory.h"
diff --git a/lib/frrstr.h b/lib/frrstr.h
index d52d6a448..f0066d0fc 100644
--- a/lib/frrstr.h
+++ b/lib/frrstr.h
@@ -23,11 +23,16 @@
#include <sys/types.h>
#include <sys/types.h>
-#ifdef HAVE_LIBPCREPOSIX
+#ifdef HAVE_LIBPCRE2_POSIX
+#ifndef _FRR_PCRE2_POSIX
+#define _FRR_PCRE2_POSIX
+#include <pcre2posix.h>
+#endif /* _FRR_PCRE2_POSIX */
+#elif defined(HAVE_LIBPCREPOSIX)
#include <pcreposix.h>
#else
#include <regex.h>
-#endif /* HAVE_LIBPCREPOSIX */
+#endif /* HAVE_LIBPCRE2_POSIX */
#include <stdbool.h>
#include "vector.h"
diff --git a/lib/vty.c b/lib/vty.c
index d524ae53c..5fe8d8247 100644
--- a/lib/vty.c
+++ b/lib/vty.c
@@ -24,11 +24,16 @@
#include <lib/version.h>
#include <sys/types.h>
#include <sys/types.h>
-#ifdef HAVE_LIBPCREPOSIX
+#ifdef HAVE_LIBPCRE2_POSIX
+#ifndef _FRR_PCRE2_POSIX
+#define _FRR_PCRE2_POSIX
+#include <pcre2posix.h>
+#endif /* _FRR_PCRE2_POSIX */
+#elif defined(HAVE_LIBPCREPOSIX)
#include <pcreposix.h>
#else
#include <regex.h>
-#endif /* HAVE_LIBPCREPOSIX */
+#endif /* HAVE_LIBPCRE2_POSIX */
#include <stdio.h>
#include "linklist.h"
diff --git a/lib/vty.h b/lib/vty.h
index 430579c5a..0b3fd2443 100644
--- a/lib/vty.h
+++ b/lib/vty.h
@@ -22,11 +22,16 @@
#define _ZEBRA_VTY_H
#include <sys/types.h>
-#ifdef HAVE_LIBPCREPOSIX
+#ifdef HAVE_LIBPCRE2_POSIX
+#ifndef _FRR_PCRE2_POSIX
+#define _FRR_PCRE2_POSIX
+#include <pcre2posix.h>
+#endif /* _FRR_PCRE2_POSIX */
+#elif defined(HAVE_LIBPCREPOSIX)
#include <pcreposix.h>
#else
#include <regex.h>
-#endif /* HAVE_LIBPCREPOSIX */
+#endif /* HAVE_LIBPCRE2_POSIX */
#include "thread.h"
#include "log.h"