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.


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@294832 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Ed Schouten
2017-02-11 08:30:18 +00:00
parent 197b8821c6
commit ff5eeb6bee

View File

@@ -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