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
[SR-5026] pthread_key_t differs on FreeBSD #47602
Comments
Hi, Brandon. pthread_key_t is a type used to identify thread-local data using the "pthread" library that's available on most platforms. You can find out what pthread_key_t is for FreeBSD by looking in the C header pthread.h for a typedef that defines that type…or by just compiling an invalid C program like this one:
On my machine, this results in a warning:
which tells me what the type of pthread_key_t is ( |
If you do pick this up, we'd love to get a pull request from you when you've made the necessary changes! |
Comment by Brandon Bradley (JIRA) @belkadan Where is swift/stdlib/public//SwiftSchims/LibSchims.h getting the answer to this evaluation?: #if defined(__linux__) That is, is the 'defined' function generated by Swift, or is it a platform function? For FreeBSD pthread_key_t is an int, but to make an acceptable pull, I need to add another if after the above code. |
This is C++ code, not Swift code. It looks like someone else may have taken this up already: #9940 |
Comment by Brandon Bradley (JIRA) Implementing the changes in the Pull Request resolve the issue. |
PR merged! |
Environment
FreeBSD 11 | Swift 3.1
Additional Detail from JIRA
md5: a2c50465e1faeac3529591fbeea98969
Issue Description:
I'm Compiling Swift from the swift-3.1 branch on FreeBSD 11. Most of the compilation process is already complete. The hangup comes when building:
Which fails with the following error:
Followed by (what I believe to be) a related error:
What is pthread_key_t, and is there any way to determine what its value should be on FreeBSD?
The text was updated successfully, but these errors were encountered: