Skip to content

Fix missing <stdlib.h> include for malloc in wdlutf8.h#35

Open
benvenutti wants to merge 1 commit into
justinfrankel:mainfrom
benvenutti:fix/missing-stdlib-include
Open

Fix missing <stdlib.h> include for malloc in wdlutf8.h#35
benvenutti wants to merge 1 commit into
justinfrankel:mainfrom
benvenutti:fix/missing-stdlib-include

Conversation

@benvenutti
Copy link
Copy Markdown

@benvenutti benvenutti commented May 6, 2026

This adds a missing <stdlib.h> include in wdlutf8.h.

The file uses malloc, which causes a compilation error with C99+ compilers due to implicit function declaration:

error: call to undeclared library function 'malloc' with type 'void *(unsigned long)'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]

Here is an example of the issue: CSICode depends on WDL, and when building it with newer compilers (in this case MacOs arm) we get this error https://github.com/benvenutti/CSICode/actions/runs/25453382385/job/74676279990.

This change fixes the issue and improves portability.

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.

1 participant