Skip to content

Add missing cstddef include for C++ builds #15096

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

cmb69
Copy link
Member

@cmb69 cmb69 commented Jul 24, 2024

I've noticed this while trying to build sqlsrv (a C++ extension) for PHP 8.4.0alpha2 with Visual Studio 2022. While my C++ knowledge is rather limited, I think this is the proper way to make max_align_t available. At least, MSVC wouldn't know it without the include, and error out.

@arnaud-lb, since you've written that code, could you please have look?

@cmb69 cmb69 marked this pull request as ready for review July 24, 2024 21:18
Copy link
Member

@arnaud-lb arnaud-lb 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! LGTM!

@cmb69 cmb69 closed this in ab449a7 Jul 25, 2024
@cmb69 cmb69 deleted the cmb/portability-cstddef branch July 25, 2024 12:33
@macintoshplus
Copy link

@cmb69, this fix is no longer necessary to build sqlsrv?

@cmb69
Copy link
Member Author

cmb69 commented Jul 25, 2024

No, the fix is necessary (possibly for other packages, too), therefore it has been applied ("cmb69 closed this in ab449a7" means it has been applied; this alternative to merging is not uncommon when adding a NEWS entry, for instance).

@macintoshplus
Copy link

Thank you. I understand. This is a confusing way of doing things for me.

@cmb69
Copy link
Member Author

cmb69 commented Jul 25, 2024

This is a confusing way of doing things for me.

This is because GH expects to merge everything into the development branch and to cherry-pick from there to applicable release branches, but php-src wants to apply to the lowest applicable release branch, and to merge up from there. While the latter is still possible by merging via GH GUI (even to release branches), unfortunate conflicts may occur due to simultaneous merges, and the history ("git tree") might be harder to follow.

@Jan-E
Copy link
Contributor

Jan-E commented Jul 25, 2024

And some of those fixes are backported even further: https://github.com/remicollet/php-src-security/commits/PHP-8.0-security-backports/

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.

4 participants