From: Willy Tarreau Date: Sat, 28 Aug 2021 10:49:58 +0000 (+0200) Subject: BUILD/MINOR: regex: avoid a build warning on USE_PCRE2 with -Wundef X-Git-Tag: v2.5-dev5~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a01f8ce2d4cf54d1d2b210a8bf2b0437ed15cdb9;p=thirdparty%2Fhaproxy.git BUILD/MINOR: regex: avoid a build warning on USE_PCRE2 with -Wundef regex-t emits a warning on #elif USE_PCRE2 when built with -Wundef, let's just fix it. This was reported in GH issue #1369. --- diff --git a/include/haproxy/regex-t.h b/include/haproxy/regex-t.h index ff415e8e16..33d88a2eaf 100644 --- a/include/haproxy/regex-t.h +++ b/include/haproxy/regex-t.h @@ -36,7 +36,7 @@ #define PCRE_STUDY_JIT_COMPILE 0 #endif -#elif USE_PCRE2 +#elif defined(USE_PCRE2) #include #include @@ -53,7 +53,7 @@ struct my_regex { #error "The PCRE lib doesn't support JIT. Change your lib, or remove the option USE_PCRE_JIT." #endif #endif -#elif USE_PCRE2 +#elif defined(USE_PCRE2) int(*mfn)(const pcre2_code *, PCRE2_SPTR, PCRE2_SIZE, PCRE2_SIZE, uint32_t, pcre2_match_data *, pcre2_match_context *); pcre2_code *reg; #else /* no PCRE */