Merge pull request #1257 from martin-frbg/cgroups-prereq

Rework __GLIBC_PREREQ checks to avoid breaking non-glibc builds
This commit is contained in:
Martin Kroeker 2017-08-01 11:23:03 +02:00 committed by GitHub
commit e70a6b92bf
1 changed files with 10 additions and 10 deletions

View File

@ -155,7 +155,6 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifdef DYNAMIC_ARCH #ifdef DYNAMIC_ARCH
gotoblas_t *gotoblas = NULL; gotoblas_t *gotoblas = NULL;
#endif #endif
extern void openblas_warning(int verbose, const char * msg); extern void openblas_warning(int verbose, const char * msg);
#ifndef SMP #ifndef SMP
@ -187,7 +186,7 @@ int i,n;
#if !defined(__GLIBC_PREREQ) #if !defined(__GLIBC_PREREQ)
return nums; return nums;
#endif #else
#if !__GLIBC_PREREQ(2, 3) #if !__GLIBC_PREREQ(2, 3)
return nums; return nums;
#endif #endif
@ -204,8 +203,7 @@ int i,n;
nums = CPU_COUNT(sizeof(cpu_set_t),cpusetp); nums = CPU_COUNT(sizeof(cpu_set_t),cpusetp);
#endif #endif
return nums; return nums;
#endif #else
cpusetp = CPU_ALLOC(nums); cpusetp = CPU_ALLOC(nums);
if (cpusetp == NULL) return nums; if (cpusetp == NULL) return nums;
size = CPU_ALLOC_SIZE(nums); size = CPU_ALLOC_SIZE(nums);
@ -214,6 +212,8 @@ int i,n;
nums = CPU_COUNT_S(size,cpusetp); nums = CPU_COUNT_S(size,cpusetp);
CPU_FREE(cpusetp); CPU_FREE(cpusetp);
return nums; return nums;
#endif
#endif
} }
#endif #endif
#endif #endif