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

Fixes issue 38.

From-SVN: r215832
This commit is contained in:
Ian Lance Taylor 2014-10-03 05:04:59 +00:00
parent 5d20321177
commit 60d9e9fc19

View file

@ -6,7 +6,7 @@
#include <sched.h>
// 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))
static int _CPU_COUNT(unsigned int *set, size_t len) {
int cnt;