Author: ed Date: Sat Feb 11 02:30:18 2017 New Revision: 294832 URL: http://llvm.org/viewvc/llvm-project?rev=294832&view=rev Log: Fix the build of thread.cpp on CloudABI.
CloudABI does provide unistd.h, but doesn't define __unix__. We need to include this header file to make hardware_concurrency work. Modified: libcxx/trunk/src/thread.cpp Modified: libcxx/trunk/src/thread.cpp URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/src/thread.cpp?rev=294832&r1=294831&r2=294832&view=diff ============================================================================== --- libcxx/trunk/src/thread.cpp (original) +++ libcxx/trunk/src/thread.cpp Sat Feb 11 02:30:18 2017 @@ -24,9 +24,9 @@ # endif // defined(BSD) #endif // defined(__unix__) || (defined(__APPLE__) && defined(__MACH__)) -#if defined(__unix__) || (defined(__APPLE__) && defined(__MACH__)) +#if defined(__unix__) || (defined(__APPLE__) && defined(__MACH__)) || defined(__CloudABI__) # include <unistd.h> -#endif // defined(__unix__) || (defined(__APPLE__) && defined(__MACH__)) +#endif // defined(__unix__) || (defined(__APPLE__) && defined(__MACH__)) || defined(__CloudABI__) #if defined(__NetBSD__) #pragma weak pthread_create // Do not create libpthread dependency _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits