Commit 60d9e9fc by Ian Lance Taylor

runtime: Check for CPU_COUNT itself, don't check glibc version.

Fixes issue 38.

From-SVN: r215832
parent 5d203211
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
#include <sched.h> #include <sched.h>
// CPU_COUNT is only provided by glibc 2.6 or higher // CPU_COUNT is only provided by glibc 2.6 or higher
#if !defined(__GLIBC_PREREQ) || !__GLIBC_PREREQ(2, 6) #ifndef CPU_COUNT
#define CPU_COUNT(set) _CPU_COUNT((unsigned int *)(set), sizeof(*(set))/sizeof(unsigned int)) #define CPU_COUNT(set) _CPU_COUNT((unsigned int *)(set), sizeof(*(set))/sizeof(unsigned int))
static int _CPU_COUNT(unsigned int *set, size_t len) { static int _CPU_COUNT(unsigned int *set, size_t len) {
int cnt; int cnt;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment