Skip to content

Refactor PHP_SOCKADDR_CHECKS #13406

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
Feb 16, 2024
Merged

Refactor PHP_SOCKADDR_CHECKS #13406

merged 1 commit into from
Feb 16, 2024

Conversation

petk
Copy link
Member

@petk petk commented Feb 15, 2024

Instead of the project macro, the sockaddr_storage and sockaddr.sa_len can be checked with the AC_CHECK_TYPES and AC_CHECK_MEMBERS by including the sys/socket.h. Some systems (~1988) didn't include the sys/types.h in the socket.h (obsolete on current systems).

These macros by default define the HAVE_STRUCT_SOCKADDR_STORAGE and HAVE_STRUCT_SOCKADDR_SA_LEN.

Instead of the project macro, the sockaddr_storage and sockaddr.sa_len
can be checked with the AC_CHECK_TYPES and AC_CHECK_MEMBERS by including
the sys/socket.h. Some systems (~1988) didn't include the sys/types.h in
the socket.h (obsolete on current systems).

These macros by default define the HAVE_STRUCT_SOCKADDR_STORAGE and
HAVE_STRUCT_SOCKADDR_SA_LEN.
@petk petk merged commit 2592398 into php:master Feb 16, 2024
@petk petk deleted the patch-sockaddr branch February 16, 2024 12:29
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