mirror of
https://github.com/openwrt/packages.git
synced 2025-12-21 21:24:31 +04:00
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:
committed by
Rosen Penev
parent
0c0d897b47
commit
665bac8e17
@@ -211,7 +211,7 @@ Subject: [PATCH] add pcre2 support
|
||||
+#ifdef HAVE_PCRE2_H
|
||||
+#define PCRE2_CODE_UNIT_WIDTH 8
|
||||
+#include <pcre2.h>
|
||||
+#elifdef HAVE_PCRE_H
|
||||
+#elif defined(HAVE_PCRE_H)
|
||||
#include <pcre.h>
|
||||
#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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user