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 <williamatcg@gmail.com>
This commit is contained in:
parent
0c0d897b47
commit
665bac8e17
|
@ -211,7 +211,7 @@ Subject: [PATCH] add pcre2 support
|
||||||
+#ifdef HAVE_PCRE2_H
|
+#ifdef HAVE_PCRE2_H
|
||||||
+#define PCRE2_CODE_UNIT_WIDTH 8
|
+#define PCRE2_CODE_UNIT_WIDTH 8
|
||||||
+#include <pcre2.h>
|
+#include <pcre2.h>
|
||||||
+#elifdef HAVE_PCRE_H
|
+#elif defined(HAVE_PCRE_H)
|
||||||
#include <pcre.h>
|
#include <pcre.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -262,7 +262,7 @@ Subject: [PATCH] add pcre2 support
|
||||||
+ if ((*procp)->regexp.regex_ptr == NULL) {
|
+ if ((*procp)->regexp.regex_ptr == NULL) {
|
||||||
+ config_perror(pcre2_error_msg);
|
+ config_perror(pcre2_error_msg);
|
||||||
+ }
|
+ }
|
||||||
+#elifdef HAVE_PCRE_H
|
+#elif defined(HAVE_PCRE_H)
|
||||||
const char *pcre_error;
|
const char *pcre_error;
|
||||||
int pcre_error_offset;
|
int pcre_error_offset;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue