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

Include stdlib.h instead of alloca.h for alloca(3) on FreeBSD #5827

Merged
merged 1 commit into from
Apr 27, 2024

Conversation

AMDmi3
Copy link
Contributor

@AMDmi3 AMDmi3 commented Apr 23, 2024

No description provided.

@AMDmi3
Copy link
Contributor Author

AMDmi3 commented Apr 24, 2024

For the record, this fixes build on FreeBSD which doesn't have alloca.h and alloca(3) is defined in stdlib.h. I've just checked that including stdlib.h instead of alloca.h works for me on linux (ubuntu 22.04) as well, so we may consider just switching to stdlib.h as a simpler solution, however I'm not aware if it's portable. The best thing would be to check for alloca.h in cmake, but it's a bit more complicated. Can redo this PR for any of mentioned alternative solutions if it's deemed more suitable.

@sturnclaw sturnclaw merged commit ff98b64 into pioneerspacesim:master Apr 27, 2024
5 checks passed
@AMDmi3 AMDmi3 deleted the alloca branch April 27, 2024 20:43
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