configure: check for __builtin_available() availability #1788

Merged
merged 1 commit into from Aug 16, 2017

Conversation

Projects
None yet
3 participants
Collaborator

nickzman commented Aug 15, 2017

This change does two things:

  1. It un-breaks the build in Xcode 9.0. (Xcode 9.0 is currently
    failing trying to compile connectx() in lib/connect.c.)
  2. It finally weak-links the connectx() function, and falls back on
    connect() when run on older operating systems.
configure: check for __builtin_available() availability
This change does two things:
1. It un-breaks the build in Xcode 9.0. (Xcode 9.0 is currently
   failing trying to compile connectx() in lib/connect.c.)
2. It finally weak-links the connectx() function, and falls back on
   connect() when run on older operating systems.

@nickzman nickzman requested review from ghedo and bagder Aug 15, 2017

bagder approved these changes Aug 15, 2017

Looks fine to me. I test built on my mac with Xcode 8.3.2 installed and it did not define HAVE_BUILTIN_AVAILABLE and yet the tests ran fine after the build.

Coverage Status

Coverage decreased (-0.004%) to 75.048% when pulling aee89fa on nickzman/builtin-available into 774d49a on master.

@nickzman nickzman merged commit 870d849 into master Aug 16, 2017

2 of 3 checks passed

continuous-integration/travis-ci/pr The Travis CI build failed
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
coverage/coveralls Coverage decreased (-0.004%) to 75.048%
Details

@nickzman nickzman deleted the nickzman/builtin-available branch Aug 16, 2017

ehlertjd pushed a commit to Trustera/curl that referenced this pull request Aug 31, 2017

ehlertjd@gmail.com ehlertjd@gmail.com
configure: check for __builtin_available() availability (#1788)
This change does two things:
1. It un-breaks the build in Xcode 9.0. (Xcode 9.0 is currently
   failing trying to compile connectx() in lib/connect.c.)
2. It finally weak-links the connectx() function, and falls back on
   connect() when run on older operating systems.

markovicpp pushed a commit to markovicpp/curl that referenced this pull request Nov 15, 2017

macOS: Fix missing connectx function with Xcode version older than 9.0
The previous fix curl#1788 worked just for Xcode 9. This commit extends the fix to older Xcode versions effectively by not using connectx function.

Fixes curl#1330
Fixes curl#2080
Closes curl#1336

bagder added a commit that referenced this pull request Nov 15, 2017

macOS: Fix missing connectx function with Xcode version older than 9.0
The previous fix #1788 worked just for
Xcode 9. This commit extends the fix to older Xcode versions effectively
by not using connectx function.

Fixes #1330
Fixes #2080
Closes #1336
Closes #2082
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment