-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Fix for Foundation on Android 6.0 #2815
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
Fix for Foundation on Android 6.0 #2815
Conversation
Does this not re-open the library each call and then lookup the symbol? That isn't the cheapest operation. Why not make the function a lazy static that will cache the value avoiding the |
No,
|
Ah, good point about the NOLOAD. I’m still worried that future changes may end up calling the function multiple times, looking up the symbol each time. |
Understood. I updated the comment to capture your concern for any future changes. |
@swift-ci please test |
CC: @drodriguez |
I don't know why CI is not triggering. Someone else might need to trigger it. |
@swift-ci please test |
Looks like the Linux build failed for an unrelated reason...
|
@swift-ci please test linux |
Foundation's Host.swift uses
getifaddrs
andfreeifaddrs
, which currently causes Android 6.0 or below to fail to link.This PR changes these functions so they are called using
dlsym
, which allows Android 6.0 to link while providing full support on later versions of Android.This is a replacement for PR #2439.