defines for building on Hurd and BSD kernels
This commit is contained in:
committed by
Robert Osfield
parent
37258df59c
commit
68baf15806
@@ -43,8 +43,10 @@
|
||||
#endif
|
||||
#if defined (__FreeBSD__) || defined (__APPLE__) || defined (__MACH__)
|
||||
#include <sys/types.h>
|
||||
#if !defined (__GNU__)
|
||||
#include <sys/sysctl.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(__ANDROID__)
|
||||
#ifndef PAGE_SIZE
|
||||
@@ -996,7 +998,7 @@ int Thread::microSleep(unsigned int microsec)
|
||||
//
|
||||
int OpenThreads::GetNumberOfProcessors()
|
||||
{
|
||||
#if defined(__linux__)
|
||||
#if defined(__linux__) || defined(__GNU__)
|
||||
long ret = sysconf(_SC_NPROCESSORS_ONLN);
|
||||
if (ret == -1)
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user