net-snmp: support compilation with GCC 11 permissively
authorWei-Ting Yang <williamatcg@gmail.com>
Thu, 19 Dec 2024 03:41:42 +0000 (11:41 +0800)
committerRosen Penev <rosenp@gmail.com>
Mon, 23 Dec 2024 22:43:48 +0000 (14:43 -0800)
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>
net/net-snmp/patches/200-add-pcre2-support.patch

index 1eed65e8a17d430240168633cb9330c38b8d6450..c3f0cc61e1d37249ca44494856963e4918c468fa 100644 (file)
@@ -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;