summaryrefslogtreecommitdiff
path: root/ext/etc
diff options
context:
space:
mode:
Diffstat (limited to 'ext/etc')
-rw-r--r--ext/etc/etc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/etc/etc.c b/ext/etc/etc.c
index aaa5025..4a4df36 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();