From 32d53eae35a25eef77e1852cef1b039a6397578d Mon Sep 17 00:00:00 2001 From: Christian Marangi Date: Fri, 13 Oct 2023 20:32:41 +0200 Subject: [PATCH] nginx: fix nginx lua module compilation error Add pending patch fixing compilation error for missing pcre.h. This is caused by a bug on their end by trying to add pcre.h even if we are using the PCRE2 library. Fixes: f0754531c4d8 ("nginx: move to PCRE2") Signed-off-by: Christian Marangi --- ...don-t-include-pcre.h-with-PCRE2-used.patch | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 net/nginx/patches/nginx-mod-lua/101-bugfix-don-t-include-pcre.h-with-PCRE2-used.patch diff --git a/net/nginx/patches/nginx-mod-lua/101-bugfix-don-t-include-pcre.h-with-PCRE2-used.patch b/net/nginx/patches/nginx-mod-lua/101-bugfix-don-t-include-pcre.h-with-PCRE2-used.patch new file mode 100644 index 0000000000..da3c4607da --- /dev/null +++ b/net/nginx/patches/nginx-mod-lua/101-bugfix-don-t-include-pcre.h-with-PCRE2-used.patch @@ -0,0 +1,27 @@ +From f968d74c3af8259f325090d282aeb64854cdddf9 Mon Sep 17 00:00:00 2001 +From: Christian Marangi +Date: Fri, 13 Oct 2023 20:23:51 +0200 +Subject: [PATCH] bugfix: don't include pcre.h with PCRE2 used + +pcre.h is a PCRE header and is not exposed by PCRE2 library causing +compilation error as the header is not found. + +Don't include pcre.h if nginx is compiled with PCRE2 support enabled. + +Fixes: cb83e33e2657 ("feature: support pcre2") +Signed-off-by: Christian Marangi +--- + nginx-mod-lua/src/ngx_http_lua_common.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/nginx-mod-lua/src/ngx_http_lua_common.h ++++ b/nginx-mod-lua/src/ngx_http_lua_common.h +@@ -54,7 +54,7 @@ typedef struct { + #endif + + +-#if (NGX_PCRE) ++#if defined(NGX_PCRE) && !(NGX_PCRE2) + #include + # if (PCRE_MAJOR > 8) || (PCRE_MAJOR == 8 && PCRE_MINOR >= 21) + # define LUA_HAVE_PCRE_JIT 1 -- 2.30.2