Skip to content

gl_sky: include malloc.h for alloca() on MSVC too - #159

Merged
sezero merged 1 commit into
sezero:masterfrom
LDAP:fix-msvc-alloca
Jul 28, 2026
Merged

gl_sky: include malloc.h for alloca() on MSVC too#159
sezero merged 1 commit into
sezero:masterfrom
LDAP:fix-msvc-alloca

Conversation

@LDAP

@LDAP LDAP commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

MSVC has no builtin alloca; the name exists as the macro alloca -> _alloca in <malloc.h>.

Since Sky_ClipPoly started using alloca() (#103) linking fails with LNK2019: unresolved external symbol alloca.

MSVC has no builtin alloca; the name only exists as a macro in malloc.h.
Without the include, Sky_ClipPoly's alloca() calls become implicit
declarations and fail to link (LNK2019: unresolved external 'alloca').
GCC/Clang/MinGW are unaffected since alloca is a compiler builtin there.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@sezero
sezero merged commit f6b1396 into sezero:master Jul 28, 2026
8 checks passed
@sezero

sezero commented Jul 28, 2026

Copy link
Copy Markdown
Owner

Thanks, this is in.

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.

3 participants