Skip to content

Use CMake to check for strlcat/strlcpy #4860

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

Closed

Conversation

etcwilde
Copy link
Contributor

@etcwilde etcwilde commented Jan 3, 2024

Rather than try to hard-code whether or not each version of each platform has strlcat and strlcpy, this patch has CMake check to see if it's available after including string.h. If they are, then we should not redefine them. This comes after trying to build Foundation against glibc 2.38, which finally added these two functions, causing CoreFoundation to fail to compile.

@etcwilde etcwilde requested review from compnerd and parkera January 3, 2024 22:14
@etcwilde
Copy link
Contributor Author

etcwilde commented Jan 3, 2024

@swift-ci please test

Rather than try to hard-code whether or not each version of each
platform has strlcat and strlcpy, this patch has CMake check to see if
it's available after including string.h. If they are, then we should not
redefine them. This comes after trying to build Foundation against
glibc 2.38, which finally added these two functions, causing
CoreFoundation to fail to compile.
@etcwilde etcwilde force-pushed the ewilde/check-strlcat-strlcpy branch from a956723 to 7f7f26b Compare January 4, 2024 00:36
@etcwilde
Copy link
Contributor Author

etcwilde commented Jan 4, 2024

@swift-ci please test

@etcwilde
Copy link
Contributor Author

@al45tair got his merged #4876
Closing this one now.

@etcwilde etcwilde closed this Apr 29, 2024
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