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

Add missing #include <cstdlib> #53908

Closed
wants to merge 1 commit into from
Closed

Conversation

slackito
Copy link
Contributor

@slackito slackito commented Oct 30, 2023

A recent patch to libc++ (llvm/llvm-project@a65070a) removed some transitive includes, which causes build failures when using libc++ at HEAD. In particular, this file uses std::free without including <cstdlib>:

error: missing '#include <cstdlib>'; 'free' must be declared before it is used
  592 |   typedef std::unique_ptr<char, decltype(std::free)*> CStringUniquePtr;

Relevant issue: b/308435622

A recent patch to libc++ (llvm/llvm-project@a65070a) removed some transitive includes, which causes build failures when using libc++ at HEAD. In particular, this file uses `std::free` without including `<cstdlib>`:

error: missing '#include <cstdlib>'; 'free' must be declared before it is used
  592 |   typedef std::unique_ptr<char, decltype(std::free)*> CStringUniquePtr;
@copybara-service
Copy link

Thank you for your contribution! This project uses Gerrit for code reviews. Your pull request has automatically been converted into a code review at:

https://dart-review.googlesource.com/c/sdk/+/332452

Please wait for a developer to review your code review at the above link; you can speed up the review if you sign into Gerrit and manually add a reviewer that has recently worked on the relevant code. See CONTRIBUTING.md to learn how to upload changes to Gerrit directly.

Additional commits pushed to this PR will update both the PR and the corresponding Gerrit CL. After the review is complete on the CL, your reviewer will merge the CL (automatically closing this PR).

@copybara-service
Copy link

https://dart-review.googlesource.com/c/sdk/+/332452 has been updated with the latest commits from this pull request.

@srawlins
Copy link
Member

cc @rmacnak-google @aam @a-siva

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