contrib: nfs: update to 4.0.0
[vlc.git] / extras / tools / cmake-enable-ALPN-support-on-macOS-10.14.patch
blob7d9ef890ec1fd6d27a71f67404df7dedc40d74de
1 From ca650572a6d9198563c91c4c8f418a3e9f7eebe2 Mon Sep 17 00:00:00 2001
2 From: Steve Lhomme <robux4@ycbcr.xyz>
3 Date: Thu, 11 Jun 2020 15:09:53 +0200
4 Subject: [PATCH] enable ALPN support on macOS 10.14
6 It fails to link properly with a macOS 10.13 SDK:
8 [ 44%] Linking C executable curltest
9 Undefined symbols for architecture x86_64:
10 "_SSLCopyALPNProtocols", referenced from:
11 _sectransp_connect_step2 in libcmcurl.a(sectransp.c.o)
12 "_SSLSetALPNProtocols", referenced from:
13 _sectransp_connect_common in libcmcurl.a(sectransp.c.o)
14 ld: symbol(s) not found for architecture x86_64
15 ---
16 Utilities/cmcurl/lib/vtls/sectransp.c | 5 +++--
17 1 file changed, 3 insertions(+), 2 deletions(-)
19 diff --git a/Utilities/cmcurl/lib/vtls/sectransp.c b/Utilities/cmcurl/lib/vtls/sectransp.c
20 index 2fdf662a1d..22aebf3c5b 100644
21 --- a/Utilities/cmcurl/lib/vtls/sectransp.c
22 +++ b/Utilities/cmcurl/lib/vtls/sectransp.c
23 @@ -76,6 +76,7 @@
24 #define CURL_BUILD_MAC_10_9 MAC_OS_X_VERSION_MAX_ALLOWED >= 1090
25 #define CURL_BUILD_MAC_10_11 MAC_OS_X_VERSION_MAX_ALLOWED >= 101100
26 #define CURL_BUILD_MAC_10_13 MAC_OS_X_VERSION_MAX_ALLOWED >= 101300
27 +#define CURL_BUILD_MAC_10_14 MAC_OS_X_VERSION_MAX_ALLOWED >= 101400
28 /* These macros mean "the following code is present to allow runtime backward
29 compatibility with at least this cat or earlier":
30 (You set this at build-time using the compiler command line option
31 @@ -1576,7 +1577,7 @@ static CURLcode sectransp_connect_step1(struct connectdata *conn,
33 #endif /* CURL_BUILD_MAC_10_8 || CURL_BUILD_IOS */
35 -#if (CURL_BUILD_MAC_10_13 || CURL_BUILD_IOS_11) && HAVE_BUILTIN_AVAILABLE == 1
36 +#if (CURL_BUILD_MAC_10_14 || CURL_BUILD_IOS_11) && HAVE_BUILTIN_AVAILABLE == 1
37 if(conn->bits.tls_enable_alpn) {
38 if(__builtin_available(macOS 10.13.4, iOS 11, tvOS 11, *)) {
39 CFMutableArrayRef alpnArr = CFArrayCreateMutable(NULL, 0,
40 @@ -2626,7 +2627,7 @@ sectransp_connect_step2(struct connectdata *conn, int sockindex)
41 break;
44 -#if(CURL_BUILD_MAC_10_13 || CURL_BUILD_IOS_11) && HAVE_BUILTIN_AVAILABLE == 1
45 +#if(CURL_BUILD_MAC_10_14 || CURL_BUILD_IOS_11) && HAVE_BUILTIN_AVAILABLE == 1
46 if(conn->bits.tls_enable_alpn) {
47 if(__builtin_available(macOS 10.13.4, iOS 11, tvOS 11, *)) {
48 CFArrayRef alpnArr = NULL;
49 --
50 2.26.0.windows.1