Description: Compute hardware_concurrency() using get_nprocs() on GLIBC systems All glibc-based systems have get_nprocs(), which can be used to implement hardware_concurrency(). This patch fixes a build failure on Debian/kfreebsd. http://lists.debian.org/debian-bsd/2010/01/msg00036.html Author: Petr Salinger Forwarded: no --- boost1.44-1.44.0.orig/libs/thread/src/pthread/thread.cpp +++ boost1.44-1.44.0/libs/thread/src/pthread/thread.cpp @@ -14,7 +14,7 @@ #include #include #include -#ifdef __linux__ +#ifdef __GLIBC__ #include #elif defined(__APPLE__) || defined(__FreeBSD__) #include @@ -382,7 +382,7 @@ #elif defined(BOOST_HAS_UNISTD_H) && defined(_SC_NPROCESSORS_ONLN) int const count=sysconf(_SC_NPROCESSORS_ONLN); return (count>0)?count:0; -#elif defined(_GNU_SOURCE) +#elif defined(__GLIBC__) return get_nprocs(); #else return 0;