]> git.puffer.fish Git - matthieu/frr.git/commitdiff
lib: Fix so that `--enable-pcreposix` actually compiles
authorDonald Sharp <sharpd@cumulusnetworks.com>
Sun, 16 Feb 2020 19:14:04 +0000 (14:14 -0500)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Sun, 16 Feb 2020 19:14:04 +0000 (14:14 -0500)
The `--enable-pcreposix` configure option was not actually compiling
properly.  Follow pre-existing pattern for inclusion of regex.h
or the pcreposix.h header.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
lib/frrstr.c
lib/frrstr.h
lib/vty.c
lib/vty.h

index 8a72a35af013627e7887a809ca576c7764ce8d57..7ef5fffd12011398771ca505989b3c9172e32407 100644 (file)
 #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"
index 3a935c90cb26062c0d9cf5d97888634aac2e10de..441d7b86703c0839b27d1301830988c8c1e83454 100644 (file)
 #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"
index 893c215b431f5cf6765ea0e2ce887504bd4cae34..4dd6ec1b351fe8188f3920292b55a8905c50744c 100644 (file)
--- a/lib/vty.c
+++ b/lib/vty.c
 
 #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"
index a0b8e8afa173729d2712221aeb2b2e345d7bf4ba..f90a35a260bfff2044b42eca0c87be1c11322c6b 100644 (file)
--- a/lib/vty.h
+++ b/lib/vty.h
 #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"