From: Louis Dionne Date: Tue, 25 Feb 2020 22:52:34 +0000 (-0500) Subject: [libc++] Avoid including on Apple X-Git-Tag: 2020.06-alpha~123^2~866 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3b5530cf9647cf79ee45aef42c4f5fa7cc9acfd9;p=platform%2Fupstream%2Fllvm.git [libc++] Avoid including on Apple It turns out that is not well-behaved, as it transitively includes , and that one defines several non-reserved macros that clash with some downstream projects in modular builds. For the time being, using instead gives us the declarations we need without the macros. rdar://59744472 --- diff --git a/libcxx/include/__threading_support b/libcxx/include/__threading_support index d2ee0c693a15..8dc6f11782d7 100644 --- a/libcxx/include/__threading_support +++ b/libcxx/include/__threading_support @@ -26,7 +26,15 @@ #if defined(_LIBCPP_HAS_THREAD_API_PTHREAD) # include # include +// FIXME: On Apple, transitively includes , which +// is not well behaved because it defines several macros. This causes +// name collisions in some downstream projects. Instead, +// gives us the declarations we need without the bad stuff. +#ifdef __APPLE__ +# include +#else # include +#endif # ifdef __APPLE__ # define _LIBCPP_NO_NATIVE_SEMAPHORES # endif