Skip to content

Fix ext/snmp for newer net-snmp versions on Windows #15888

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

Merged
merged 1 commit into from
Sep 20, 2024

Conversation

cmb69
Copy link
Member

@cmb69 cmb69 commented Sep 14, 2024

As of net-snmp 5.8.0, the library defines their own (v)asprintf() if not available on the system. However, PHP also does this, so when building ext/snmp there would be conflicting declarations on Windows. To avoid this, we explictly define HAVE_ASPRINTF, so net-snmp does not redeclare when its headers are included.

As of net-snmp 5.8.0, the library defines their own `(v)asprintf()` if
not available on the system.  However, PHP also does this, so when
building ext/snmp there would be conflicting declarations on Windows.
To avoid this, we explictly define `HAVE_ASPRINTF`, so net-snmp does
not redeclare when its headers are included.
Copy link
Member

@devnexen devnexen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LCTM

@cmb69 cmb69 merged commit 6f5610c into php:master Sep 20, 2024
10 checks passed
@cmb69 cmb69 deleted the cmb/snmp-asprintf branch September 20, 2024 22:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants