Upstreamed in 18f51bcf99101e5bf4c737239c44064227f34db8

ncurses 6.2 - patch 20200229

From 7699b26096801fe462233ecb86484bdc3a2f0beb Mon Sep 17 00:00:00 2001
From: Anonymous Maarten <anonymous.maarten@gmail.com>
Date: Tue, 17 Mar 2020 15:22:08 +0100
Subject: [PATCH 01/15] Look for pcre2posix instead of pcre2-posix.h

---
 aclocal.m4           | 2 +-
 form/fty_regex.c     | 4 ++--
 include/ncurses_defs | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/aclocal.m4 b/aclocal.m4
index c27cc368..e6ccc42f 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -8506,7 +8506,7 @@ if test "x$with_pcre2" != xno ; then
 	esac
 
 	# either way, check for the library header files
-	AC_CHECK_HEADERS(pcre2-posix.h pcreposix.h)
+	AC_CHECK_HEADERS(pcre2posix.h pcreposix.h)
 fi
 ])dnl
 dnl ---------------------------------------------------------------------------
diff --git a/form/fty_regex.c b/form/fty_regex.c
index da0ef08c..d1daf714 100644
--- a/form/fty_regex.c
+++ b/form/fty_regex.c
@@ -39,8 +39,8 @@ MODULE_ID("$Id: fty_regex.c,v 1.28 2020/02/02 23:34:34 tom Exp $")
 
 #if HAVE_REGEX_H_FUNCS || HAVE_LIB_PCRE2	/* We prefer POSIX regex */
 
-#if HAVE_PCRE2_POSIX_H
-#include <pcre2-posix.h>
+#if HAVE_PCRE2POSIX_H
+#include <pcre2posix.h>
 #elif HAVE_PCREPOSIX_H
 #include <pcreposix.h>
 #else
diff --git a/include/ncurses_defs b/include/ncurses_defs
index e37fc901..a0339457 100644
--- a/include/ncurses_defs
+++ b/include/ncurses_defs
@@ -120,7 +120,7 @@ HAVE_NANOSLEEP
 HAVE_NC_ALLOC_H
 HAVE_NEWPAD	1
 HAVE_PANEL_H
-HAVE_PCRE2_POSIX_H
+HAVE_PCRE2POSIX_H
 HAVE_PCREPOSIX_H
 HAVE_POLL
 HAVE_POLL_H
-- 
2.21.1

