Skip to content

Fix GH-15565: --disable-ipv6 during compilation produces error EAI_SYSTEM not found #15567

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

Closed
wants to merge 1 commit into from

Conversation

nielsdos
Copy link
Member

No description provided.

Copy link
Member

@cmb69 cmb69 left a comment

Choose a reason for hiding this comment

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

Thank you! This looks good to me (I'm still trying to find where that macro is actually defined, though, out of interest).

@cmb69
Copy link
Member

cmb69 commented Aug 24, 2024

I'm still trying to find where that macro is actually defined, though, out of interest

Wrong question. It's about:

AC_DEFINE('HAVE_GAI_STRERROR', 1);

Not sure that ca6dd7e was correct (well, seems it was according to what we had). But why did we define HAVE_GAI_STRERROR only for IPv6 support? And why do we use gai_strerror() on Windows at all? According to the Microsoft documentation, it is not thread safe, and WSAGetLastError() should be used instead.

@nielsdos
Copy link
Member Author

Interestingly, gai_strerror is MT-safe on glibc.

@cmb69
Copy link
Member

cmb69 commented Aug 24, 2024

Interestingly, gai_strerror is MT-safe on glibc.

POSIX isn't explicitly clear about this.

Anyhow, I still think we should go with this least intrusive patch for stable versions, and may have a closer look into this for the master branch (gai_strerror() is apparently supported on Windows even for IPv4 only, but the MT issue might need to be resolved).

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.

--disable-ipv6 during compilation produces error EAI_SYSTEM not found on php-8.3.10-src
3 participants