From 1756f0d25b6b53905697246f71e1575a906a0cea Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sat, 20 Nov 2010 13:42:17 +0100 Subject: nproc: Fix condition. * lib/nproc.c: Test HAVE_PTHREAD_GETAFFINITY_NP, not HAVE_PTHREAD_AFFINITY_NP. --- lib/nproc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/nproc.c') diff --git a/lib/nproc.c b/lib/nproc.c index 90b568eb37..80481e9405 100644 --- a/lib/nproc.c +++ b/lib/nproc.c @@ -24,7 +24,7 @@ #include #include -#if HAVE_PTHREAD_AFFINITY_NP && 0 +#if HAVE_PTHREAD_GETAFFINITY_NP && 0 # include # include #endif @@ -71,7 +71,7 @@ num_processors_via_affinity_mask (void) Therefore this code is not enabled. glibc >= 2.3.4 has sched_getaffinity whereas NetBSD 5 has sched_getaffinity_np. */ -#if HAVE_PTHREAD_AFFINITY_NP && defined __GLIBC__ && 0 +#if HAVE_PTHREAD_GETAFFINITY_NP && defined __GLIBC__ && 0 { cpu_set_t set; @@ -94,7 +94,7 @@ num_processors_via_affinity_mask (void) return count; } } -#elif HAVE_PTHREAD_AFFINITY_NP && defined __NetBSD__ && 0 +#elif HAVE_PTHREAD_GETAFFINITY_NP && defined __NetBSD__ && 0 { cpuset_t *set; -- cgit v1.2.1