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

game_shared: include malloc.h on win32, otherwise use alloca.h #213

Merged
merged 1 commit into from
Aug 11, 2024

Conversation

a1batross
Copy link
Contributor

alloca() is a nonstandard function, and its definition location depends on the platform.

Ideally, we test which header defines it, on Win32 it's malloc.h as per the documentation, on *nixes it's usually alloca.h, but sometimes it's even stdlib.h.

For now, just include alloca.h to fix building on macOS (thanks @FiEctro for the help!)

alloca() is a nonstandard function, and its definition location depends on the platform.

Ideally, we test which header defines it, on Win32 it's malloc.h as per the documentation, on *nixes it's usually alloca.h, but sometimes it's even stdlib.h.

For now, just include alloca.h to fix building on macOS (thanks @FiEctro for the help!)
@SNMetamorph SNMetamorph merged commit 2332f75 into SNMetamorph:master Aug 11, 2024
6 checks passed
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