Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

net-snmp: support compilation with GCC 11 permissively #25577

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Yang-Wei-Ting
Copy link

Maintainer: @stintel

Compile tested: armv7, imx/cortexa7, OpenWrt 23.05

Description:
200-add-pcre2-support.patch uses #elif defined 9 times and #elifdef twice.
Maybe we can change those two #elifdef to #elif defined so that it is more consistent and more permissive to GCC 11?

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 <[email protected]>
@neheb
Copy link
Contributor

neheb commented Dec 21, 2024

where is GCC11 used?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants