Please sign in to comment.
fix build on non-Linux glibc systems
ninja-build does not build on non-Linux archs, such as GNU/kFreeBSD and GNU/Hurd. The problem is that the GetProcessorCount() implementation for these architectures is the sysconf() one, but <unistd.h> has not been included, causing sysconf() and _SC_NPROCESSORS_ONLN to not be declared. Another solution (which is the one I chose) is to make use of the "linux" implementation which uses get_nprocs(), which is a GNU extension and thus available for anything using GNU libc.
- Loading branch information...