diff options
author | Bruno Haible <bruno@clisp.org> | 2010-11-20 13:42:17 +0100 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2010-11-20 13:42:17 +0100 |
commit | 1756f0d25b6b53905697246f71e1575a906a0cea (patch) | |
tree | 0e99c81920e35c28e1bc35b1c74cf5f61b20a73c /lib/nproc.c | |
parent | 79006111160a3dbe227f7a690546fcedbcba35c6 (diff) | |
download | gnulib-1756f0d25b6b53905697246f71e1575a906a0cea.tar.gz |
nproc: Fix condition.
* lib/nproc.c: Test HAVE_PTHREAD_GETAFFINITY_NP, not
HAVE_PTHREAD_AFFINITY_NP.
Diffstat (limited to 'lib/nproc.c')
-rw-r--r-- | lib/nproc.c | 6 |
1 files changed, 3 insertions, 3 deletions
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 <stdlib.h> #include <unistd.h> -#if HAVE_PTHREAD_AFFINITY_NP && 0 +#if HAVE_PTHREAD_GETAFFINITY_NP && 0 # include <pthread.h> # include <sched.h> #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; |