From 665bac8e17b563d30fcc09c9854e249c9ad3d092 Mon Sep 17 00:00:00 2001 From: Wei-Ting Yang Date: Thu, 19 Dec 2024 11:41:42 +0800 Subject: [PATCH] net-snmp: support compilation with GCC 11 permissively Use #elif defined instead of #elifdef as seen elsewhere throughout the patch file. This avoids the following errors when compiling with GCC 11: ``` mibgroup/ucd-snmp/proc.c:45:2: error: invalid preprocessing directive #elifdef; did you mean #ifdef? 45 | #elifdef HAVE_PCRE_H | ^~~~~~~ | ifdef mibgroup/ucd-snmp/proc.c:243:2: error: invalid preprocessing directive #elifdef; did you mean #ifdef? 243 | #elifdef HAVE_PCRE_H | ^~~~~~~ | ifdef ``` Signed-off-by: Wei-Ting Yang --- net/net-snmp/patches/200-add-pcre2-support.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/net-snmp/patches/200-add-pcre2-support.patch b/net/net-snmp/patches/200-add-pcre2-support.patch index 1eed65e8a1..c3f0cc61e1 100644 --- a/net/net-snmp/patches/200-add-pcre2-support.patch +++ b/net/net-snmp/patches/200-add-pcre2-support.patch @@ -211,7 +211,7 @@ Subject: [PATCH] add pcre2 support +#ifdef HAVE_PCRE2_H +#define PCRE2_CODE_UNIT_WIDTH 8 +#include -+#elifdef HAVE_PCRE_H ++#elif defined(HAVE_PCRE_H) #include #endif @@ -262,7 +262,7 @@ Subject: [PATCH] add pcre2 support + if ((*procp)->regexp.regex_ptr == NULL) { + config_perror(pcre2_error_msg); + } -+#elifdef HAVE_PCRE_H ++#elif defined(HAVE_PCRE_H) const char *pcre_error; int pcre_error_offset; -- 2.30.2