Skip to content

Define asprintf when _GNU_SOURCE is not set on Linux #4612

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

Merged
merged 1 commit into from
Jul 9, 2022

Conversation

etcwilde
Copy link
Member

@etcwilde etcwilde commented Jul 8, 2022

This PR will define asprintf when _GNU_SOURCE is not set while building for Linux. The build system defines _GNU_SOURCE when building for Linux/Android here; https://github.com/apple/swift-corelibs-foundation/blob/main/CoreFoundation/CMakeLists.txt#L69-L70, but being pedantically correct will ensure there are no surprises.

Not all layers of the c library have asprintf defined, however, it is
available when `_GNU_SOURCE` is set.
@etcwilde
Copy link
Member Author

etcwilde commented Jul 8, 2022

@swift-ci please test

Copy link
Member

@compnerd compnerd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@etcwilde
Copy link
Member Author

etcwilde commented Jul 8, 2022

swift CI rebooted.
@swift-ci please test macOS platform

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