From 0621ddc423b498bc1caaac78a06496b8a22bf6fa Mon Sep 17 00:00:00 2001 From: akr Date: Wed, 15 Oct 2014 13:09:23 +0000 Subject: * ext/etc/etc.c (etc_nprocessors_affin): Test CPU_ALLOC availability. CentOS 5 don't have CPU_ALLOC(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47943 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/etc/etc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ext/etc') diff --git a/ext/etc/etc.c b/ext/etc/etc.c index aaa5025a9c..4a4df3654a 100644 --- a/ext/etc/etc.c +++ b/ext/etc/etc.c @@ -909,7 +909,7 @@ io_pathconf(VALUE io, VALUE arg) #if (defined(HAVE_SYSCONF) && defined(_SC_NPROCESSORS_ONLN)) || defined(_WIN32) -#ifdef HAVE_SCHED_GETAFFINITY +#if defined(HAVE_SCHED_GETAFFINITY) && defined(CPU_ALLOC) static int etc_nprocessors_affin(void) { @@ -987,7 +987,7 @@ etc_nprocessors(VALUE obj) #if !defined(_WIN32) -#ifdef HAVE_SCHED_GETAFFINITY +#if defined(HAVE_SCHED_GETAFFINITY) && defined(CPU_ALLOC) int ncpus; ncpus = etc_nprocessors_affin(); -- cgit v1.2.3