37 lines
1.1 KiB
Diff
37 lines
1.1 KiB
Diff
|
From b43c8382c885551b0f230c8493e79bf04d94e366 Mon Sep 17 00:00:00 2001
|
||
|
From: Martin Kroeker <martin@ruby.chemie.uni-freiburg.de>
|
||
|
Date: Wed, 1 May 2019 10:46:46 +0200
|
||
|
Subject: [PATCH] Correct argument of CPU_ISSET for glibc <2.5
|
||
|
|
||
|
fixes #2104
|
||
|
|
||
|
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||
|
[Retrieved from:
|
||
|
https://github.com/xianyi/OpenBLAS/commit/b43c8382c885551b0f230c8493e79bf04d94e366]
|
||
|
---
|
||
|
driver/others/memory.c | 4 ++--
|
||
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||
|
|
||
|
diff --git a/driver/others/memory.c b/driver/others/memory.c
|
||
|
index ac8545f35..db14cde02 100644
|
||
|
--- a/driver/others/memory.c
|
||
|
+++ b/driver/others/memory.c
|
||
|
@@ -229,7 +229,7 @@ int get_num_procs(void) {
|
||
|
n=0;
|
||
|
#if !__GLIBC_PREREQ(2, 6)
|
||
|
for (i=0;i<nums;i++)
|
||
|
- if (CPU_ISSET(i,cpuset)) n++;
|
||
|
+ if (CPU_ISSET(i,&cpuset)) n++;
|
||
|
nums=n;
|
||
|
#else
|
||
|
nums = CPU_COUNT(sizeof(cpuset),&cpuset);
|
||
|
@@ -1772,7 +1772,7 @@ int get_num_procs(void) {
|
||
|
n=0;
|
||
|
#if !__GLIBC_PREREQ(2, 6)
|
||
|
for (i=0;i<nums;i++)
|
||
|
- if (CPU_ISSET(i,cpuset)) n++;
|
||
|
+ if (CPU_ISSET(i,&cpuset)) n++;
|
||
|
nums=n;
|
||
|
#else
|
||
|
nums = CPU_COUNT(sizeof(cpuset),&cpuset);
|