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

Added check for existing strlcpy/strlcat on Linux #4811

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

tachoknight
Copy link
Contributor

The GNU C Library version 2.38 introduced strlcat() and strlcpy() for the first time (https://lists.gnu.org/archive/html/info-gnu/2023-07/msg00010.html). Because these functions are defined in CoreFoundation/Base.subproj/CoreFoundation_Prefix.h there is a compile error in that the CF_INLINE expands to include static, which the glibc versions do not. Even if the function signatures were the same, there would be link errors due to multiple definitions found of the same functions.

This patch adds an additional check in the CMakeFiles.txt file under the Linux section for the functions and, if found, defines a flag that prevents the functions from being defined in CoreFoundation/Base.subproj/CoreFoundation_Prefix.h.

@parkera
Copy link
Member

parkera commented Aug 18, 2023

@swift-ci test

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.

None yet

2 participants