@@ -168,13 +168,28 @@ index e8be5d0ccd9104..804cdebc648032 100644
168168 #endif /* USE_ECH */
169169
170170 #ifdef HAS_ALPN
171- --- a/lib/curl_setup.h
172- +++ b/lib/curl_setup.h
173- @@ -57,7 +57,6 @@
174- !defined(__clang__) && \
175- defined(__GNUC__) && __GNUC__ >= 12 && \
171+ - /* Workaround for Homebrew gcc 12.4.0, 13.3.0, 14.1.0 and newer (as of 14.1.0)
172+ + /* Workaround for Homebrew gcc 12.4.0, 13.3.0, 14.1.0, 14.2.0.
173+ + Fixed it 14.2.0_1. We also omit the workaround for 14.2.0 because there
174+ + is now way to tall 14.2.0_1 and 14.2.0 apart, and the workaround breaks
175+ + the fixed 14.2.0_1 version.
176+ that started advertising the `availability` attribute, which then gets used
177+ by Apple SDK, but, in a way incompatible with gcc, resulting in misc errors
178+ inside SDK headers, e.g.:
179+ @@ -53,9 +56,13 @@
180+ Followed by missing declarations.
181+ Fix it by overriding the built-in feature-check macro used by the headers
182+ to enable the problematic attributes. This makes the feature check fail. */
183+ - #if defined(__APPLE__) && \
184+ - !defined(__clang__) && \
185+ - defined(__GNUC__) && __GNUC__ >= 12 && \
186+ + #if defined(__APPLE__) && \
187+ + !defined(__clang__) && \
188+ + defined(__GNUC__) && \
189+ + (__GNUC__ == 12 || \
190+ + __GNUC__ == 13 || \
191+ + (__GNUC__ == 14 && \
192+ + defined(__GNUC_MINOR__) && (__GNUC_MINOR__ <= 1))) && \
176193 defined(__has_attribute)
177- - #define availability curl_pp_attribute_disabled
194+ #define availability curl_pp_attribute_disabled
178195 #endif
179-
180- #if defined(__APPLE__)
0 commit comments