diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 58748ea1c..18a218cec 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -114,5 +114,8 @@ In chronological order: * carlkl * [2013-12-13] Fixed LAPACKE building bug on Windows +* Isaac Dunham + * [2014-08-03] Fixed link error on Linux/musl + * [Your name or handle] <[email or website]> * [Date] [Brief summary of your changes] diff --git a/driver/others/init.c b/driver/others/init.c index 913538555..50a1a23f7 100644 --- a/driver/others/init.c +++ b/driver/others/init.c @@ -865,7 +865,7 @@ void gotoblas_set_affinity2(int threads) {}; void gotoblas_affinity_reschedule(void) {}; -int get_num_procs(void) { return get_nprocs(); } +int get_num_procs(void) { return sysconf(_SC_NPROCESSORS_ONLN); } int get_num_nodes(void) { return 1; } diff --git a/driver/others/memory.c b/driver/others/memory.c index f44b37b97..9fdb18f69 100644 --- a/driver/others/memory.c +++ b/driver/others/memory.c @@ -162,7 +162,7 @@ int get_num_procs(void); #else int get_num_procs(void) { static int nums = 0; - if (!nums) nums = get_nprocs(); + if (!nums) nums = sysconf(_SC_NPROCESSORS_ONLN); return nums; } #endif