summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/frrstr.c4
-rw-r--r--lib/frrstr.h5
-rw-r--r--lib/vty.c5
-rw-r--r--lib/vty.h4
4 files changed, 18 insertions, 0 deletions
diff --git a/lib/frrstr.c b/lib/frrstr.c
index 8a72a35af0..7ef5fffd12 100644
--- a/lib/frrstr.c
+++ b/lib/frrstr.c
@@ -25,7 +25,11 @@
#include <string.h>
#include <ctype.h>
#include <sys/types.h>
+#ifdef HAVE_LIBPCREPOSIX
+#include <pcreposix.h>
+#else
#include <regex.h>
+#endif /* HAVE_LIBPCREPOSIX */
#include "frrstr.h"
#include "memory.h"
diff --git a/lib/frrstr.h b/lib/frrstr.h
index 3a935c90cb..441d7b8670 100644
--- a/lib/frrstr.h
+++ b/lib/frrstr.h
@@ -22,7 +22,12 @@
#define _FRRSTR_H_
#include <sys/types.h>
+#include <sys/types.h>
+#ifdef HAVE_LIBPCREPOSIX
+#include <pcreposix.h>
+#else
#include <regex.h>
+#endif /* HAVE_LIBPCREPOSIX */
#include <stdbool.h>
#include "vector.h"
diff --git a/lib/vty.c b/lib/vty.c
index 893c215b43..4dd6ec1b35 100644
--- a/lib/vty.c
+++ b/lib/vty.c
@@ -23,7 +23,12 @@
#include <lib/version.h>
#include <sys/types.h>
+#include <sys/types.h>
+#ifdef HAVE_LIBPCREPOSIX
+#include <pcreposix.h>
+#else
#include <regex.h>
+#endif /* HAVE_LIBPCREPOSIX */
#include <stdio.h>
#include "linklist.h"
diff --git a/lib/vty.h b/lib/vty.h
index a0b8e8afa1..f90a35a260 100644
--- a/lib/vty.h
+++ b/lib/vty.h
@@ -22,7 +22,11 @@
#define _ZEBRA_VTY_H
#include <sys/types.h>
+#ifdef HAVE_LIBPCREPOSIX
+#include <pcreposix.h>
+#else
#include <regex.h>
+#endif /* HAVE_LIBPCREPOSIX */
#include "thread.h"
#include "log.h"