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

glibc headers: reallocarray added to glibc in v2.26 #17610

Merged
merged 1 commit into from
Oct 20, 2023

Conversation

rootbeer
Copy link
Contributor

Here's the glibc commit that adds reallocarray to glibc: https://sourceware.org/git/?p=glibc.git;a=commit;h=2e0bbbfbf95fc9e22692e93658a6fbdd2d4554da

The reallocarray symbol is declared in both stdlib.h and malloc.h.

Fix #17607

Here's the glibc commit that adds reallocarray to glibc:
https://sourceware.org/git/?p=glibc.git;a=commit;h=2e0bbbfbf95fc9e22692e93658a6fbdd2d4554da

The reallocarray symbol is declared in both stdlib.h and malloc.h.

Fix ziglang#17607
@andrewrk
Copy link
Member

andrewrk commented Oct 19, 2023

Nice, thank you. For your information, the long-term plan for this kind of thing is the universal headers project. It's currently vaporware, but the idea is to programmatically combine many different sets of libc headers into one which can be configured via preprocessor defines (such as __GLIBC_MINOR__ as you use here).

In the meantime, patches such as this one are welcome, and will be maintained by systematically re-applying them after future glibc updates.

@andrewrk andrewrk enabled auto-merge (rebase) October 19, 2023 04:51
@andrewrk andrewrk merged commit 1631dc9 into ziglang:master Oct 20, 2023
10 checks passed
@rootbeer rootbeer deleted the reallocarray-glibc-2.26 branch October 20, 2023 15:18
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.

ld.lld error: undefined symbol: reallocarray
2 participants